I have wrapped this in a Snippet to advance the parsing order, but I cannot seem to get this to work...hence the {?}.

<ul class="accordion">

{exp:channel:category_archive channel="hurricane" style="linear" dynamic="on" }

        {if segment_3 == '{?}'}<li class="active"> {if:else} <li class="">{/if}
          <div class="title">
          <div class="content">
           <a href="{path='members/hurricane/'}">{title}</a><br />


  • I don't believe 'dynamic=on' is a thing, according to the docs anyway. Bit more on what you're trying to achieve with errors or issue would help. Jan 27, 2014 at 6:19
  • This code sits in a sidebar on a single entry's template and it simply should highlight the current entry by adding an active class to the <li> tag.
    – Nutmeg
    Jan 27, 2014 at 9:39

2 Answers 2


Your layout may have to change because EE doesn't yet know if the title is inside the category. If you can transfer the conditional inside the entry_titles you may have better luck.

{if segment_x == {url_title}}do something{/if}

EE category stuff can be a pita and I've often used gwCode categories. You do get more flexibility and control but its a case by case thing.


What happens when you use:

segment_3 == {category_URL_title}

Assuming you're looking to see if current category is in the URL.

I try and avoid if:else and simply use 2 simples instead or switchee.

  • Thanks Stuart, but I'm not looking for the current category - just the current entry..
    – Nutmeg
    Jan 27, 2014 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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