I'm trying to create a conditional to determine if the structure entry url is the same as the global {current_url}. I created a structure field called, {product_category}. For some reason I cannot get conditional below to evaluate to true. Any idea what the issue is?

When callinng in template {product_category} I get the following output:


When calling in template {current_url} I get the following output:


Here's my conditional:

{if product_category == current_url . '/'} True {if:else} False {/if}

1 Answer 1


If I read your question correct (the links aren't working) you're trying to check if {product_category} is equal to {current_url} if so you need the following.

{if '{product_category}' == '{current_url}'} 
  • That worked, however I ended up using Playa instead to categorize products. Thanks for the help, Chris!
    – frshjb373
    Apr 14, 2015 at 17:09

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.