ExpressionEngine 7.5 has been Released! Learn More!
Hello,
I need help with the Reefine addon for Expression Engine…
Both tags {filter_title} & {filter_value} populate the value of my dropdown field. However, I want to populate the label. How can I accomplish this?
{exp:reefine channel="companies" parse="inward"
filter:requestedservice:fields="requested_service"
filter:requestedservice:delimiter="|"
filter:requestedservice:type="list"
filter:requestedservice:show_empty_filters="yes"
url="/services/filters/{requestedservice}/
}
<div class="display-box">
<div>
{requestedservice}
{filters}
<div class="option" data-value="{filter_value}" data-href="{url}">{filter_title}</div>
{/filters}
{if active_filters > 0}
<div class="dd-selected-wrap">
{filters}
{if filter_active}
<a href="http://{url}" rel="nofollow" class="selected-filter">{filter_title} 🞪</a>
{/if}
{/filters}
</div>
{/if}
{/requestedservice}
</div>
{/exp:reefine}
I presume you’re calling values from a radio/checkbox field? If so have you checked the docs on outputting values and labels - https://docs.expressionengine.com/latest/fieldtypes/checkboxes.html#variable-pair
Example code for outputting all vars in a radio/checkbox group:
{field_name}
Value: {item}
{!-- 1 --}
Value: {item:value}
{!-- 1 --}
Label: {item:label}
{!-- One --}
{/field_name}
Hey Rob,
Thanks for taking the time to respond. I edited the code in my post to show the Reefine tags and took out extra html to make it a bit easier to see what I’m trying to accomplish.
When using the Reefine Addon, it doesn’t let you use the native EE tags. I already tried and it just outputs the tag itself. With the way its setup is I am telling it which field I want to filter by (fields=”requested_service”) and I am giving that field (filter group) a new name within the addon itself (filter:requestedservice).
Then I’m calling the new field name (filter group) and displaying all the items with the filters loop.
{requestedservice}
{filters}
<div class="option" data-value="{filter_value}" data-href="{url}">{filter_title}</div>
{/filters}
{/requestedservice}
So the only tags that this addon seems to have available to output info is {filter_value} and {filter_title}. But they both output the value of my field in EE Channel.
I want to be able to output both the value and the label of my field for this channel. I hope I explained this well.
Thanks, Viktor.
It’s a been many years since I used Reefine, I’ll have to pass on this one hoping someone else can pick it up.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.