List by Custom Attribute
-
Ok so what I am trying to do is create a list of locations stored in event manager that have a positive value in a custom attribute field.
So step one of course is add the conditional placeholder:
// #_LATT{ServiceOptDetails} case 'has_ServiceOptDetails': if (is_array($EM_Event->location_attributes) && !empty($EM_Event->location_attributes['ServiceOptDetails'])) $replacement = preg_replace('/\{\/?has_ServiceOptDetails\}/', '', $match); else $replacement = ''; break;
Now I had assumed that the following code would generate a list of locations that included a positive value in ServiceOptDetails using the following code on a page.
<table class="minimal_table"> <tr><td>Location</td><td align="center">City</td><td align="right">More Info</td></tr> [locations_list] {has_ServiceOptDetails} <tr><td>#_LOCATIONNAME</td><td align="Center">#_LOCATIONTOWN</td><td align="right"><a href="#_LOCATIONURL">Get More Info</a></td></tr> <tr><td colspan="3">#_LATT{ServiceOptDetails}</td></tr> {/has_ServiceOptDetails} [/locations_list] </table>
And yet my list comes up empty.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘List by Custom Attribute’ is closed to new replies.