Jump to content

Pages - Breadcrumbs and Folder Indexes


Foxtrek_64

Recommended Posts

As discussed in the linked support thread, I have a page I've built using folders which lives at /docs/dmca/takedown-notice. When navigating to the page, this url is reflected in my url (friendly urls enabled), however the breadcrumbs simply contain the file name and omit the path.

I would like pages to be able to build breadcrumbs, but this may require a bit of changes to how the page system works. Currently, in order to have a folder work as its own page, you have to create a page where the Page Filename is index.html. This automatically gets visually stripped from friendly urls.

I see three implementation options:

  1. Require each folder to have an index.html page. This is an implementation detail and can be hidden, perhaps by getting rid of folders and pages and just allowing pages to be children of other pages. This way, the same logic used to build the url can be used to build the breadcrumbs.
  2. Fall back to a path. Let's say I have a page at /docs, which is its own page (or a folder with an index.html page), but /docs/dmca is not its own page. The breadcrumb entry for /docs should go to the /docs/index.html page and the breadcrumb entry for /docs/dmca should work up the breadcrumb list until it finds the next available page, in this case /docs. This is information that can be calculated and cached ahead of time. Worst case, it should fall back to the canonical homepage.
  3. Add the option, per page, to hide the breadcrumb. No breadcrumb, no problem!
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...