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

Pro Search - How do I show the category

How Do I?

From EE Slack's avatar
From EE Slack
185 posts
one year ago
From EE Slack's avatar From EE Slack

From Slack

I have a page of entries that I have the category filter available on.

When applied I want to show which category(s) they’ve chosen I would typically pull this from the URL but I can’t when I have the query encoded. Anyone know how I might do this?

       
Russ K.'s avatar
Russ K.
172 posts
one year ago
Russ K.'s avatar Russ K.

Hi There…

I think this tag should do what you are looking for:

{pro_search_search:class}

Russ

       
matthewcarleton's avatar
matthewcarleton
25 posts
one year ago
matthewcarleton's avatar matthewcarleton

I ended up using this and it worked

{exp:pro_search:results query="{segment_4}" limit="1"}
{exp:channel:categories show="{pro_search_category}" style="linear"}
{category_url_title}
{/exp:channel:categories}
{/exp:pro_search:results}
       
Jacobjsdhfg's avatar
Jacobjsdhfg
3 posts
one year ago
Jacobjsdhfg's avatar Jacobjsdhfg

This way, you can retrieve and display the chosen category(s) without needing to decode the URL.

If you’d like, I can provide a sample JavaScript code snippet to demonstrate how this could be achieved.

       

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.