Keyword for site details for current listed asset?

Matrix Version: 5.4.1.2

I’ve created an asset listing for each of our Matrix instances to list custom form and asset builder assets, looking to have a better picture of submissions that might be affected by upgrades or major system changes.

One of the details I’d like to include is the asset lineage, and in particular which site the asset lives under.

%asset_lineage% will give me the first part of that, but I’m not having luck finding something to give me the site detail quickly.

Would %asset_linking_info_current% give you want you need?

A JSON object of the linking information of the current asset’s link only, based on its current lineage context.

I think it might do. Just need to push it through some SSJS - is there a way I can access the lineage subarray directly from the keyword in this:

> <script runat="server">
> var linkingInfo = %asset_linking_info_current%;
> var lineage = linkingInfo.lineage;
> // want first two items typically for the parent folder and parent site in our setups
> print('%globals_asset_name:'+linkingInfo.lineage[0]+'% :');
> print('%globals_asset_name:'+linkingInfo.lineage[1]+'% : ');
> </script>

?

You could also try and use %asset_linking_lineage% perhaps?

That way you could easily just do:

%asset_linking_lineage^index:0^as_asset:asset_name%
%asset_linking_lineage^index:1^as_asset:asset_name%
1 Like

That’s a lot simpler. I’m happy using SSJS now, but I’m mindful that some of our content staff may not be. Plus, having to lookup unknown keyword modifiers always gives you the opportunity to discover more :slight_smile:

1 Like

This needs to be:

%asset_linking_lineage^json_decode^index:0^as_asset:asset_name%

and behaviour isn’t consistent for assets which aren’t inside a site asset.

Yep, that’s a bug, https://squizmap.squiz.net/matrix/11689, which is fixed in 5.5.

Is there an expected release time frame for 5.5 ? Are there many changes?

We are aiming for end of April at this stage.

Lots… :slight_smile: