%asset_parent% output != %asset_parents% for Site assets


(Douglas (@finnatic at @waikato)) #1

Matrix Version: 5.4.5.1

I’ve found that %asset_parent% for a site asset will return the asset itself, while %asset_parents% will return the id of the parent - not sure if that is expected behaviour or not?

I’m not entirely sure how to read the keyword explanation on - https://matrix.squiz.net/manuals/concepts/appendices/keyword-replacements
: Returns the current parent asset based on the current asset in its lineage context.

This may of course be a bug fixed in 5.5 (as per discussion on Keyword for site details for current listed asset?)


(John gill) #2

This is the same in 5.5.

It kinda makes sense because lineage context is determined by URL, and the Site is the top of the URL context. Above that, the lineage doesn’t have any information with which to choose one of the available parents as %asset_parent%.


(Bart Banda) #3

Could be a bug, but not sure. What happens if you use %frontend_asset_parent% or %globals_asset_parent% ?

And where are you printing the keyword? In the standard page that is the index page asset of the site or in a paint layout applied to the site?