Nest asset by keyword


#1

Matrix 5.4.3.1

Hi, is there a way to nest a particular asset via a keyword?
For example: %nest_asset_ASSETID%

Thanks.


(Bart Banda) #2

try %globals_asset_contents_raw:1234%


#3

Brilliant, thanks Bart. That worked using a static asset ID… now I need to use a modifier with it to pass it an asset ID from a metadata field…

I’ve tried %globals_asset_contents_raw:asset_metadata_FIELDNAME% but it didn’t work.
However, I’m not entirely sure if this is because the metadata value is set on the content container rather than the standard page asset itself, or if I’ve got the modifier wrong.

Thanks again!


#4

https://matrix.squiz.net/manuals/keyword-replacements/chapters/keyword-modifiers#Using-Keyword-Replacements-as-Argument-Values


#5

Thanks for the reply @bkelly. That didn’t seem to work, I suspect it’s because the metadata is being set via a content container template, which is applying the metadata value to the content container asset rather than the page asset…? I could be wrong.

I’ve tried variations of %globals_asset_contents_raw:{asset_metadata_FIELDNAME}%, none seem to work unfortunately.


#6

Got it! @bkelly

I switched it around so it gets the metadata field, and modified it with the asset_content_raw keyword:
%asset_metadata_FIELDNAME^as_asset:asset_contents_raw%

Thanks for the help! :slightly_smiling_face: