Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In my project I render weekly presentation view on a page different from a node view page of the node that has the opening hours. In that case Drupal.settings.OpeningHours.categories empty because menu_get_object() function to get the node data.
I think that this can be changed and the node to come as argument in opening_hours_js_settings function.
Comment | File | Size | Author |
---|---|---|---|
#4 | opening_hours-categories_missing-2409713-4.patch | 3.01 KB | moonray |
#1 | categories_missing-2409713-1.patch | 3.02 KB | boyan.borisov |
Comments
Comment #1
boyan.borisov CreditAttribution: boyan.borisov commentedI've created a patch.
Comment #2
mikl CreditAttribution: mikl commentedA few notes:
Should have a single space between if and (.
Should have a single space between if and (.
Add a line break here.
Comment #3
boyan.borisov CreditAttribution: boyan.borisov commentedComment #4
moonray CreditAttribution: moonray at Chapter Three commentedAttached patch fixes the formatting issues described above (none of the code has been changed).
Also, this tweak makes a custom block with opening hours work on pages that are not the node that they are attached to.
Comment #6
mikl CreditAttribution: mikl at Högh Digital commentedCommitted, thanks.