Asset_lineage replace keyword modifier


(gja) #1

Hi,

 

I'm attempting to use a keyword modifier on an asset_lineage keyword.  My goal is to modify asset_lineage so that only the last part is retained (ie, the content after >).

 

However when I try %asset_lineage^replace:Submissions:Round%, nothing is returned, reverting the asset listing to %asset_lineage% the lineage content is returned as expected.

 

It would seem that replace keyword modifier doesn't work on asset_lineage.

 

Is this correct?  We are using Squiz Matrix 4.18.2.

 

John Lynch suggested this might be that case in http://forums.squizsuite.net/index.php?showtopic=9787

 

Thanks Georgina.


(Tim Davison) #2

We have this issue as well, v4.12 - I thought I had raised a post about it some time ago, but can't find it, so maybe I only meant to.

 

The way I've worked around this is check the asset url instead, and use contains modifier.  Not as elegant but you can wangle it to make it work in some cases, but not all.

 

Another thing I've found is File type assets that asset_lineage does not always return a value once they are published.  Initially I thought this was because of file types being served from '__data', but when I tested sometimes it did and sometimes it didn't.  


(Charlotte Westney) #3

Just found this thread before posting the same problem.

The only workaround I can think of is to nest in an asset listing, to look up the tree 1 level for direct linked pages, then print out the asset name. Which seems like major overkill just to print out the name of a page's parent.

 

I'd actually suggest a new keyword; %asset_parent% to show the parent of the asset from its current location. I need that a lot and not having modifiers work on asset_lineage is a right royal pain...

 

Charlie.


(Nic Hubbard) #4

I'd actually suggest a new keyword; %asset_parent% to show the parent of the asset from its current location. I need that a lot and not having modifiers work on asset_lineage is a right royal pain...

 

Yeah, those new keywords are included in 5.2.6.0.


(gja) #5

This is great - I've tested it and it works

 

<a href="%asset_parent^as_asset:asset_href%"> %asset_parent^as_asset:asset_name%</a> - gives me a link to the direct parent.

 

Unfortunately this new keyword is not listed in the manuals - so it is impossible to discover from reading the manuals :( 

 

Georgina.