I am having some problem with the Low Seg2Cat extension. I am trying to load all entries for a particular category using the third URI segment. For instance: '/specials/category/europe'. This is the current basic markup:

{exp:channel:entries channel="specials" orderby="date" category_group="8" category=segment_3_category_id}
<p>{entry_date format='%j%S %M %Y'}</p>

However, all this outputs at the moment is any item that has been categorised. For instance, items categorised as 'Europe' or as 'USA'. Uncategorised items do not appear. Moreover, any value entered into segment 3 returns this same list.

I am currently using (and have just upgraded to) EE 2.9.2 before developing this page. Low Seg2Cat is in its latest version, 2.8.1.

Any help would be appreciated!

  • Is category=segment_3_category_id} a typo, or is that your actual code? – Derek Hogue Mar 20 '15 at 18:51
  • That is the actual code. As mentioned in the comment below, EE 2.9.2 has phased out the use of nesting multiple curly braces, so I have omitted one around 'segment_3_category_id'. – Alex Harriss Mar 21 '15 at 19:18

Your code should look like this (note the end of the opening channel:entries tag - you were missing a combination of quotes and curly braces):

{exp:channel:entries channel="specials" orderby="date" category="{segment_3_category_id}"}
    <p>{entry_date format='%j%S %M %Y'}</p>

I've also omitted the category_group parameter, since it is overridden by the category parameter.

Be sure that your selected category group is chosen in the Low Seg2Cat extension settings.

I should also add that if you set your category URL indicator to "category", then you wouldn't need Low Seg2Cat in this specific case (and you could remove the category parameter entirely) - the URL you showed would automatically load all entries in the "europe" catgeory.

EE 2.9.2 has phased out the use of nesting multiple curly braces

This is not true. You only omit the braces inside of conditionals (and even then, sometimes you may still need to use quoted parsed variables there). Everywhere else, variables need braces around them in order to be parsed and used.

  • Thanks for the response Derek (I'm working with the original asker on this). I'm now wondering if this is a Seg2Cat bug. We have two different category groups, both of which contain a category with a URL title of 'europe'. Even though Seg2Cat is configured to search all Category Groups, it's only ever returning the category ID of the 'europe' category in the other group, not the one we want. – Jack Mar 24 '15 at 13:07
  • Update: Just read the fine-print at the very bottom of Seg2Cat's documentation that explains this is a known caveat: gotolow.com/addons/low-seg2cat/docs . I'll look into your other suggestion about category URL indicators now, thanks for the assistance. – Jack Mar 24 '15 at 13:11
  • Ah, yes - you may need to disable Seg2Cat for one of those category groups in that case. – Derek Hogue Mar 24 '15 at 13:33

You need to surround segment_3_category_id in parethesis and {}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.