Breadcrumb override issues

Post

Posted
Rating:
#4986 (In Topic #1114)
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’
I'd like to start off on a possible minor bug within the breadcrumb overrides feature – for about an hour I was dissecting custom overrides to try and figure out why I kept getting a breadcrumbs.xml: XML_ERR_NAME_REQUIRED error. Turns out, I had some labels with '&'. The system doesn't like those. I tried replacing them with & but these are just treated as text and aren't parsed correctly. Needless to say, I have to use 'and' within my overrides, which isn't a big deal, I just want to point out that it could just be a possible bug.

Secondly, I'm having issues getting overrides to play nice with child pages (see what I did there?). They seem to work beautifully with parent pages, though.

Example:

Code

<substitution label="Features and Tools" match_key="help:website:featuresandtools">
      <span label="Home">:</span>
      <span label="Help and Support">help:</span>
      <span label="Website">help:website:overview</span>
   </substitution>

…shows:  Home → Help and Support → Website → Features and Tools

The website breadcrumb link should link to help:website:overview but it's completely ignoring the child-page (currently links to help:website)

Last edit: by Joe

Online now: No Back to the top

Post

Posted
Rating:
#5010
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi,

This will fix the first issue:
https://github.com/ocproducts/composr/commit/9143b7386e9bf62d0f90782b4f203abbf03a6377

The second issue seems to be a misunderstanding. help:website:overview translates to something like help/index.php?page=website&type=overview (depending on the URL scheme). i.e. the 3rd clause is for the 'type' parameter (screen type), not for specifying a child page.

Let's pretend your child page has a codename of website_overview, you'd just do help:website_overview. Composr will automatically convert that into the correct URL, with whatever URL moniker that page has (e.g. website/overview).


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

Was I helpful?
  • 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.
Online now: No Back to the top

Post

Posted
Rating:
#5012
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’
But TYPE does display the child page; is it not supposed to?

The UI I created is a bunch of tabs and sub tabs. Depending on which tab (or page) is being viewed, this dictates the active styling on the tab. The issue is, I need to be able to specify the parent page as well as the child page within the page-link for the active styling to take effect…this is just the way I coded it up. Adding a 3rd clause (in my case, the child page) makes all the active styling work correctly.

You can check it out to get a better understanding of what I did:
https://bosslife.org/help (site is closed so you'll have to login first)

By the way, I migrated to a catalogues-display of my content using the cc_embed block. So as long as I have my title tags in order within my entries, the breadcrumbs show nicely by default so I dont need to override anything.
Online now: No Back to the top

Post

Posted
Rating:
#5014
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Ok, I think you're using child page in your own way, while it is also the term for when there's a direct parent/child relationship between Comcode pages in Composr.

I'd need to see it not working on your site to comment further, as your XML worked okay on a quick mockup I did on my end.


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

Was I helpful?
  • 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.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,052 topics, 7,195 posts, 10,827 members
  • Our newest member is LowfareMart
Back to Top