Comparing two values

Hi Folks

I have an asset listing where the root node is set using the GET variable nav_list.

In the Format screen, I am trying to compare %asset_parent% with %nested_get_nav_list% using the following condition:

%begin_asset_parent^eq:nested_get_nav_list% Y %else_asset% N %end_asset%

However, this always returns “N”, even though when I output them individually:

  • %asset_parent% returns 1050798

  • %nested_get_nav_list% also returns 1050798

Given that both values appear identical, why does the conditional comparison fail?

Thanks for any help

Paul

Hi Paul,

I think the issue is that the :eq modifier takes a value, and not a keyword as parameters.

If you change:

%begin_asset_parent^eq:nested_get_nav_list%

to something like:

%begin_asset_parent^replace_keywords:eq:{nested_get_nav_list}%

you should have more luck. At least that worked when I tested something similar.

Hope that helps.

Cheers!
— Gary