Breadcrumb override issues

Post

Posted
Rating:
#4672 (In Topic #944)
Joe
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

Post

Posted
Rating:
#4692
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).

Post

Posted
Rating:
#4694
Joe
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:
404 Error (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.

Post

Posted
Rating:
#4696
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.
0 guests and 0 members have recently viewed this.