Evaluating a keyword inside a conditional keyword

(David Wallace) #1

I have a asset listing that’s nested under a standard page.
In the type format of the listing I’m using a conditional keyword to test against some metadata.


I’m trying to pass the [whatever-site] as a variable defined by additional get parameters of the nested content container.
However when I try to modify the conditional keyword to contain the variable it barfs!

I’ve tried…

%begin_asset_metadata_site_key^eq:\{nested_get_[thevariable]\}% (as according to https://matrix.squiz.net/manuals/keyword-replacements/chapters/keyword-modifiers#Using-Keyword-Replacements-as-Argument-Values)

Is this possible? Am I missing something?


(Bart Banda) #2

Depends on the version of Matrix you are on.

Have you tried %begin_nested_get_[var]^eq:{asset_metadata_site_key% ?

If that fails, you could always try using SSJS?

(David Wallace) #3

Brilliant… that idea with a bit of fiddling worked even better than I wanted.

Thanks Bart.