Attached is code to integrate with Panels 3. Included is a location context, a location from node relationship, and a country name content.
| Comment | File | Size | Author |
|---|---|---|---|
| location_panels.zip | 4.67 KB | wwhurley |
Attached is code to integrate with Panels 3. Included is a location context, a location from node relationship, and a country name content.
| Comment | File | Size | Author |
|---|---|---|---|
| location_panels.zip | 4.67 KB | wwhurley |
Comments
Comment #1
aelling commentedI am just needing this! Is there are chance that this plugin will support location provinces so a province context would be available?
Comment #2
wwhurley commentedWhat you would do is modify plugins/context/location.inc where it has the following:
That controls what elements of the context are exposed. You would add 'province' and 'province_name' to the array returned by location_panels_context_location_convert_list and then add those cases to the switch in location_panels_context_location_convert returning $context->data['province'] or ['province_name'] as appropriate as $context->data is a location array loaded location_load_location.
I also notice a bug in location_panels_context_create_location, I have $data = location_load_location($nid), which should probably be $data = location_load_location($lid)
Comment #3
aelling commentedOk great! Thanks for the response and explanation.
Comment #4
yesct commentedtagging
Comment #5
dwwThanks, I need something just like this. However, let's move discussion over to the original issue for this feature: #487790: Panels integration