Breadcrumbs in paint layout via %asset_lineage_linked%


(Tom Chadwin) #1

I need to implement breadcrumbs in a paint layout, not a design. I have found %asset_lineage_linked%. However, I need to mark up the breadcrumbs as a list. I have tried to achieve this with a modifier:

<ul><li>%asset_lineage_linked^replace:>:</li><li>%</li></ul>

This seems to remove everything, though. Do I need to escape/encode something, and if so, how? Or is the problem something else entirely?

 

Thanks

 

Tom


(Tom Chadwin) #2

I saw the note about > not being supported in regex matches, so I tried the following:

<ul><li>%asset_lineage_linked^escapehtml^replace:&gt;:</li><li>%</li></ul>

Still nothing - the keyword just disappears (this would presumably be no use in this case anyway, since I need the links to work, rather than escaped and output to screen). I tested:

<ul><li>%asset_lineage_linked^replace:a:b%</li></ul>

Same behaviour. Output is always:

<ul><li></li></ul>

What am I getting wrong with the replace modifier?

 

Thanks

 

Tom


(Nic Hubbard) #3

Couldn't you just use a normal Breadcrumb Design Area and only show it when using the paint layout? 


(Bart Banda) #4

I can confirm that these don't work on a 4.18.2 system, other simpler modifiers such as uppercase and escapehtml don't even work. I have submitted this as a bug.

 

In the meantime however, I think you have to either do what Nick suggested, or result to using JS. :(


(Tom Chadwin) #5

Thanks, both. I was trying to use a paint layout because of the structure of the HTML. I'll have to look back at it and see if I can shoehorn it into the design.


(Nic Hubbard) #6

Thanks, both. I was trying to use a paint layout because of the structure of the HTML. I'll have to look back at it and see if I can shoehorn it into the design.

 

Well, it would be pretty ugly, and I hate doing it. But you could add a CSS rule in your Paint Layout that shows the hidden breadcrumb.

 

Alternately, use javascript to check if a div ID or Class now exists (when printing your paint layout) and if it does, show the breadcrumb.


(Tom Chadwin) #7

I *really* don't want to get into front-end stuff for nav.

 

Anyway, I've managed to shift the breadcrumbs into the design, so I am now sorted. I'm trying to work with a menu_normal design area now for my main site menu, and having problems, but that's for another thread.

 

Thank again, both

 

Tom


(Bart Banda) #8

Btw, this has been fixed now and comited to the next versions: http://bugs.matrix.squiz.net/view_bug.php?bug_id=6782


(Tom Chadwin) #9

Great. Many thank, Bart.