Breadcrumb Overrides
Posted
#5727
(In Topic #1335)

Standard member

The issue is, it seems I have to define an override for each page within the help zone to get the breadcrumbs to show accurately. This isn't required for the forum zone (as forums, topics, posts, etc all show as children of home:forum in the breadcrumbs by default), so why is it required here? Or am I just doing something wrong?
Code
<substitution match_key="help:">
<span label="{!HOME}">:</span>
</substitution>
That shows the help zone as a child of "home", as expected. But, without defining an override for each page within the zone, the breadcrumbs don't even show on pages within the help zone, UNLESS I remove {+START,IF,{$IN_STR,{$BREADCRUMBS},<a }} from GLOBAL_HTML_WRAP, but then it only shows the current page's title and doesn't show the "home" or "help" links.
So either way I'm having to create an override for each page. What am I doing wrong?
Last edit: by Joe
Posted

Standard member

I have a page called "refunds" within my "help" zone. Currently, without any modifications to the system (any breadcrumb overrides or removal of that code from the global template), the breadcrumbs are completely absent.
I added this override:
Code
<substitution match_key="help:refunds">
<span label="{!HOME}">:</span>
<span label="Help">help:</span>
</substitution>
Now it works, but I have to add an override for every single page. That's a filthy workaround.
Pages without a breadcrumb override don't show at all because it's being hidden by {+START,IF,{$IN_STR,{$BREADCRUMBS},<a }} in the global template. If I remove that, it only shows "Refunds" in the breadcrumbs. It needs to say "Home>Help>Refunds", which seems to only be accomplished by adding an override.
But my question is, if the forum doesn't require an override for every forum, topic, or post…why do my pages each need one?
Posted

Standard member

Code
<substitution match_key="help:">
<span label="{!HOME}">:</span>
</substitution>
<substitution match_key="help:_WILD">
<span label="{!HOME}">:</span>
<span label="Help">help:</span>
</substitution>
…makes the world spin again. That's kinda deceiving though, cos there's no wildcard in the override for the forums…
Anywho, it's working now.

Posted

Site director

That's right.
Everything on the forum zone (or most things, I'm not 100%) flows back to the forumview page, which is the default page for that zone. For example, a topic is in a forum, and hence the breadcrumbs inherent to that topic are going to flow through forumview.
So that's why the XML configuration is simpler for the forum zone, it is inherently already half way there.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
1 guest and 0 members have just viewed this.