As_asset asset_lineage


(Warwick Barnes) #1

G'day,

 

Just wanted to check if I'm understanding this correctly, or if it's some sort of bug…

 

Using Matrix 4.12.6, in the default format bodycopy of an asset listing, I'm getting an asset Id from a database and using this to show some information about the standard-page assets.

 

These work:

 

%ds__id^as_asset:asset_name%

%ds__id^as_asset:root_nodes%

%ds__id^as_asset:asset_status_colour%

 

But these just return blank:

 

%ds__id^as_asset:asset_lineage%

%ds__id^as_asset:asset_lineage_linked%

 

The assets have a valid lineage that would show up normally as part of an asset listing if I was just using %asset_lineage%.

 

Does anyone know what's going on here?

 

Thanks,

 

Warwick


(Bart Banda) #2

I suspect that Matrix isn't able to figure out the lineage of the asset based on the way you are requesting it (using a data source and database). It might not be a bug but just the way that the lineage function works and how it gets evaluated because assets can live in multiple places. 

What happens if you try and print %ds__id^as_asset:asset_url%?  It might print empty as well.


(Warwick Barnes) #3

Thanks for your reply.

 

I've now checked %ds__id^as_asset:asset_url% – and it works.

 

%ds__id^as_asset:root_nodes% works as well, and copes with multiple root notes by displaying a comma-separated list.

 

Cheers, Warwick