Trying to display different link for one entry (thing1) inside channel entries loop.

{exp:channel:entries channel=“things”}


     {if url_title == ’thing1’}
     <a href=“somecustomlink.html”>Read more</a>
     <a href=“{path=’things’}/{url_title}”>Read more</a>


Problem is, that EE uses to compare {url_title} with current template, not with “things” channel entrie's.

How to write this conditional?

  • Is this exp:channel:entries variable pair nested inside another one?
    – Sobral
    Feb 5, 2015 at 16:51

3 Answers 3


If this exp:channel:entries code block is appearing on a page that is used for displaying a specific entry (e.g. a specific news article page) then try adding a dynamic="no" parameter to the channel:entries tag. Otherwise, I would double-check that Robson hasn't already hit the nail on the head with his 'nested channel:entries' hypothesis.


Solved the problem with using {title} instead of {url_title} in conditional.


Although not as flexible, I'm adding suggestion to write the conditional using {if segment_x == 'thing1'} as another viable option.

Your Answer

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

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