Search code examples
expressionengine

expressionengine 2.x compare two variables against each other inside EE tags


I have looked through the EE docs and can find

if variable operator value

However I am trying to do

if variable operator variable

It doesnt seem to work

I am doing

{exp:channel:entries channel="p"}
{if last_segment == company_name}

Company name is a field in the channel 'p'

Any one any ideas?

thanks

Andy


Solution

  • Got it, had to add

    custom_fields="yes"
    

    to the exp:channel