We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Reefine Add-On

How Do I?

avori's avatar
avori
67 posts
one year ago
avori's avatar avori

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}
       
Rob Allen's avatar
Rob Allen
3,105 posts
one year ago
Rob Allen's avatar Rob Allen

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}
       
avori's avatar
avori
67 posts
one year ago
avori's avatar avori

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.

       
Rob Allen's avatar
Rob Allen
3,105 posts
one year ago
Rob Allen's avatar Rob Allen

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.

? 1
       
avori's avatar
avori
67 posts
one year ago
avori's avatar avori

Thanks, Rob. I appreciate you taking a the time to help!

       
Rob Allen's avatar
Rob Allen
3,105 posts
one year ago
Rob Allen's avatar Rob Allen

It might be worth joining the EECMS Slack channel and asking the question there. https://expressionengine.com/blog/join-us-in-slack

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.