0

I have a problem with design when using Solspace Tag that is: Some Word. So, using this gets the right class for the submenu element:

<li {if segment_1 == 'myblog' AND segment_4 == 'work'}class="current"{/if}><a href="{site_url}myblog/tagged/tag/work">Work</a></li>

But this does not setup the class for LI-element:

<li {if segment_1 == 'myblog' AND segment_4 == 'latest&#43;projects'}class="current"{/if}><a href="{site_url}myblog/tagged/tag/latest&#43;projects">Latest Projects</a></li>

I have tried +, and with html entities, still no success.

Ideas how to make the class working on the situation that Tag is SOME WORD = 2 words?

Thanks.

6
  • Is your tag actually appear as latest&#43;projects in the URL? That's your problem right there. Somehow the + which Tag uses by default to replace spaces is being encoded before it saves. Mar 16 '15 at 11:31
  • Source code is giving tag as "latest+projects" but when I set that up, it doest help, as I wrote. Either way, it does not give the class for the li-element. So with latest&#43;projects = no success, and with latest+projects = no success either.
    – Riverboy
    Mar 16 '15 at 11:39
  • What is the URL of the template where this is not working? Mar 16 '15 at 11:41
  • Well this was the solution: I just use "latest projects" on the code, which is giving url as latest%20projects but now it shoots the class for the element.
    – Riverboy
    Mar 16 '15 at 11:43
  • Fin, is this resolved? Was latest&#43;projects hard-coded in your conditional? Can you update the above question with an example URL and your template code? Also, please provide the Tag and EE version numbers that you are using. Thanks.
    – Solspace
    Mar 19 '15 at 1:55

Your Answer

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

Browse other questions tagged or ask your own question.