Replace_keywords to get dynamic asset content


(Gabriele Antonini) #1

Hi, I'm trying to retrieve the content of an asset A from another asset B.
The id of the asset A must be dynamic depending on a get parameter passed to the asset B (which is nested).

Now, I tried with something like this:
 

%globals_asset_contents^replace_keywords:{nested_get_gamesFeedId}%

But it's not working, it just doesn't print anything.

%globals_asset_contents:12345%

Works fine (but it's not dynamic)

%nested_get_gamesFeedId%

It prints the correct item id 12345

 

 

So, apparently the get variable is correctly resolved, if I try to access statically to the asset content it works, if I use the replace_keywords to make it dynamic, it fails.

 

Any ideas?

 

Thanks,

Gab

 


(Peter McLeod) #2

Hi

Maybe try the 'as_asset' keyword modifier instead:

https://manuals.matrix.squizsuite.net/keyword-replacements/chapters/keyword-modifiers

Thanks

Peter


(Bart Banda) #3

Yea what Peter said, so try this:

%nested_get_gamesFeedId^as_asset:asset_contents_raw%