Low Search Filters Category Toggle Issue
I'm having issues adding a category id to the toggle:category="" function.
I'm using GWcode Categories plug-in instead of the built in EE Categories tags and can't seem to output the current category id within the Low Search toggle tags.
Outputting the {cat_id} tag outside the Low Search Tag works.
I've also tried using PHP to store the {cat_id} value and output it but with PHP template turned on, this doesn't output the value.
Any help or advice would be really helpful?
Jemes
//GWCode Version
{exp:low_search:form result_page="{current_url}"}
{exp:low_search:filters}
{exp:gwcode_categories group_id="8" cat_url_title="{segment_3}" min_depth="2"}
{cat_name} {cat_id}
{/exp:gwcode_categories}
{/exp:low_search:filters}
{/exp:low_search:form}
//PHP Version
{exp:low_search:form result_page="{current_url}"}
{exp:low_search:filters}
{exp:gwcode_categories group_id="8" cat_url_title="{segment_3}" min_depth="2"}
{cat_name}
{/exp:gwcode_categories}
{/exp:low_search:filters}
{/exp:low_search:form}
Replies
Low 7 Jul 2014 19:26
First of all, you don't need to use both the Form and the Filters tag inside each other. The Form tag is identical to the Filters tag, but adds a html form around its contents. I'm guessing you can just use the Filters tag here.
Can you explain what it is that isn't working?
Also, what are your Low Search, EE and PHP versions?
Can you also try and re-paste your code, as GetSat removed some. You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.
Jemes 7 Jul 2014 20:17
Thanks for the Form tip, I'll remove that from my code.
I've re-pasted my code: http://pastie.org/private/wm8ff4mkchd...
EE: 2.8.1
LS: 3.1.4
The issue is the cat_id is not outputting in the url.
When using the GWCode my category is output as category=%7Bcat_id%7D instead of category=103.
Thanks for your help.
Low 7 Jul 2014 20:23
Try adding parse="inward" to the GWCode tag.
Jemes 8 Jul 2014 08:12
That works, thank you.
I did look at the PHP Parsing Stage within the EE template but didn't think of the GWcode.
Thanks again for the swift reply.
Low 8 Jul 2014 08:13
No worries. By the way, you don't need PHP to be enabled in the template in order for this to work. Better turn it off, even.