Background:
I have an asset listing that generates a json object of events. I’m wanting to pass that asset listing a dynamic root node(s) from a content container template.
globals_asset_contents_raw:313081 refers to our asset listing, which we want the SSJS to be processed on. asset_metadata_assetIds is a related asset metadata field on the content container that will have the assetids that we want to be root nodes.
The issue is that when the page gets loaded, the asset listing isn’t getting the ids, it’s getting the un-evaluated keyword of {asset_metadata_assetIds}. The error is as follows in the log manager;
Any ideas or what I’m doing wrong, or perhaps where I could look to fix it?
Thanks in advance,
Mark
The issue is that by the time %globals_asset keywords are evaluated the %asset_ context will have changed and will no longer refer to the content container (it may refer to to %frontend_asset, or maybe refer to nothing, I’m not sure).
You either need a way to evaluate the asset_metadata_assetIds immediately, and then use that later when globals_asset is processed (probably SSJS?), or you need a way to force the %globals_asset_contents_raw to evaluate immediately “inside” the content container.
I think there is a trick around using an empty param for this latter purpose, something like
Thanks for your suggestions, it definitely gave me some food for thought.
I ended up abandoning my initial idea of filtering my assets at the asset-listing level and instead just used some SSJS to do it for us. Not the most ideal solution, but it gets the job done.