Cat2
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4
Back to this add-on's main page
View Other Add-ons From Mark Croxton
Category group gets ignored
General
doctorlove
|
Posted: 11 December 2015 06:50 AM |
|
|
|
I have several category groups that sometimes have an identical category.
For example, category_group 2 has the category ‘Anticipate’. Category_group 5 has this as well.
The id of Anticipate in category_group 2 is ID 2, whereas for category_group 5 the ID would be 5.
I have anticipate in my url and use the plugin like this:
{exp:cat2:id category_group=‘2’ debug=“yes” category_name=’{segment_2}’ parse=‘inward’}
What I’m expecting is that it’ll return 3, but instead it returns 5. It shouldn’t, as ID 5 is not a part of category_group 2, as requested.
What am I doing wrong? Thanks!
|
|
|
Mark Croxton
|
Posted: 11 December 2015 07:51 AM |
# 1
|
|
Developer
|
category_group=‘2’
Note the curly quote? Be careful to use straight quotes ‘2’
|
|
|
doctorlove
|
Posted: 11 December 2015 08:38 AM |
# 2
|
|
|
Thanks!
The issue was elsewhere.
The full usage is like this
{exp:channel:prev_entry channel="phase_details" url_title="{freebie_3}" dynamic="no" parse='inward' category="{exp:cat2:id category_url_title='{segment_2}' category_group='2' parse='inward'}"}
I needed a parse inward on both the channel:prev_entry as well as teh exp:cat2.
I returned the tag in the template, and it returned 5. Now it returns 2, as expected.
I can’t seem to reproduce the issue anymore, though.
So yes, fixed :) Thanks for your support!
|
|
|