My goal was to mark current/active article on the list. Code looks like:
<ul class="list-plain">
{exp:channel:entries channel="products" category="{segment_3_category_id}" orderby="title" sort="asc" status="open" paginate="bottom" dynamic="no"}
{if switchee_no_results}<div class=""><p>No entries yet.</p></div>{/if}
<li {if segment_4=="{url_title}"} class="current"{/if}><a href="{site_url}{segment_1}/{segment_2}/{segment_3}/{url_title}">{title}</a></li>
{/exp:channel:entries}
</ul>
but no class added to the proper list item.
Then I have decided to check if IF statement works and did simple test run
Seg: {segment_4} - URL: {url_title}
{if segment_4=="{url_title}"}FOUND!{/if}
no result found even there was proper Seg to Url match.
Then I have checked if there is no results
Seg: {segment_4} - URL: {url_title}
{if segment_4=="{url_title}"}FOUND!{if:else}NOT FOUND{/if}
and I have got proper matches.
Any clue what is going on?
Thanks
{if "{segment_4}"=="{url_title}"}
? So putting thesegment_4
between quotes.