Nesting standard page selected in related asset metadata field

(John G) #1


In my metadata schema I have made a related asset field named ‘page.Alerts’ and selected a standard page asset.

I would like to nest the contents of this specific page at the top of any page using this schema.

I am wondering what keywords I would put in my paint layout to achieve this.

According to the documentation, I would use something like this: %asset_metadata_<related_asset_field_name>^as_asset:<asset_attribute/metadata>%

I have tried the following but it returns nothing:

What am I doing wrong?

Thanks for your help!!

(John gill) #2

My guess is that you’ve got the keyword in the Page Contents part of the Paint Layout, rather than in the Type Formats -> Default Format.

Many keywords don’t work* in the Page Contents of Paint Layouts, I generally don’t bother even trying to use it.

*: for values of “don’t work” approaching “work differently”. I think actually Page Contents gets evaluated in a different context so maybe %globals_asset would work where %asset doesn’t

(Bart Banda) #3

Where is the metadata field stored? On the standard page asset that you are viewing on the frontend or somewhere else?

Also maybe try %frontend_asset_metadata_page.Alerts^as_asset:asset_contents_raw%

Also, does just printing %frontend_asset_metadata_page.Alerts% give you the right asset ID that you want? Maybe start there and make sure that works.

Also, what version of matrix are you using?