Globals_get inside globals_asset?


(Grant) #1

Hello all,

I’m trying to get the below keyword to work:
%globals_asset_linking_info:{globals_get_templateID}%

It works perfectly if i do it like this:
%globals_asset_linking_info:925843%

Just wondering if there’s a way to nest a globals_get in a keyword like this? Or maybe I have the syntax wrong?

I’ve also tried it in SSJS which also didn’t work.

Thanks for you’re assistance in advance.

Cheers,
Grant


(Tbaatar) #2

The easiest way to achieve this is to use globals GET keyword with keyword modifier to get what you need.
like this.

%globals_get_templateID^as_asset:asset_linking_info%;

In this example I’m pulling asset link info from different site.

57

You could then use index to print the data with keyword modifier or use SSJS.

The other way to achieve this in SSJS is to pass the ID to an variable and print it like this:

print('%globals_asset_linking_info:' + templateID + '%');