Open vaniwiki opened 8 months ago
The croissant plugin lets you set unique breadcrumbs per page. I know that "name" is used in all navigation, but I need to be able to change that somehow. "Name" for breadcrumbs makes sense if you don't have very deep hierarchy, but in my use case it makes sense to make the breadcrumbs semantically correct, while still being able to keep "name" as a unique (short) identifier.
What do you mean with to change that somehow
? Can you give an example of a deep hierarchy where the name is a problem?
In the sidebar I'm using "label" for navigation. My labels look like this: Chapter 1, Chapter 2, Chapter 3, Text 1, Text 2, Text 3 and so on. This makes sense if you know the book and which chapter you are reading. If I change "name" to this, then I lose my unique identifying name for the page. Sorry if I'm unable to express myself clearly...
In your example : Home > Books > Bhagavad-gita > Chapter 1 > Text 1
The names are Home
, Books
, Bhagavad-gita
, ...
They are semantically correct because the parent name is also at the right side.
There are too many textual fields for sure.
Normally, you need only:
Historically, there are more but practically they are not needed.
Chapter 1, Chapter 2, Chapter 3, Text 1, Text 2, Text 3
looks like styling. If you need chapter
before a heading, it's more of a styling problem.
If you use the title (label) as name, you got quickly in a styling problem with overflow.
In other words, the H1
and label
should not exist.
I could delete them and use them as default for a title
but not for a name
.
What do you mean with
to change that somehow
? Can you give an example of a deep hierarchy where the name is a problem?
Here is an example of my meta tags:
"name":"SB 1.1.1",
"label":"Text 1",
"h1":"SB 1.1.1",
"title":"Śrīmad Bhāgavatam 1.1.1",
For me it makes sense to keep name as a unique identifier. I figured that I could use "label" for sidebar navigation.
Here is how breadcrumbs look with these sources:
"name": Home > Books > Srimad-Bhagavatam > SB Canto 1 > SB 1.1: Questions by The Sages > SB 1.1.1
"label": Home > Books > Srimad-Bhagavatam > Canto 1 > Chapter 1 > Text 1
And if possible to force it back to "path": Home > Books > SB > 1 > 1
This is especially nice for mobile view.
The "name" tag makes the breadcrumbs repeat the same information (book name) four times, whereas "label" is custom navigation to address this issue. I would like to keep things as logical and semantically correct as possible. Let me know if there is a better way to do this!
Or may be not. I can delete the label
and make it the default for name
:)
The description is pretty the same as a name
.
https://combostrap.com/page/the-label-fzgbczwi
You cannot just add a "crumb" meta tag? Or make it so we can set the breadcrumb meta source?
If the <breadcrumb />
tag gets an option to set its output, like page-explorer, one can potentially do things like:
<box class="d-none d-md-block> <breadcrumb output="h1" /> </box>
<box class="d-block d-md-none> <breadcrumb output="path" /> </box>
To get "shorthand" breadcrumbs on mobile device, while retaining full length breadcrumbs on device sizes above.
Not only that, but one would be able to set different type breadcrumbs per section. I have nested namespaces where I want short breadcrumbs, and then I have some shallow 1-level namespaces where I want to keep them longer. ☺️🙏🏻
To better optimise for use cases like mine: I have a hierarchy based on books with chapters and texts.
My paths look like:
books:bg:1:1
Which displays as
Home > Bhagavad-gita > Bg. 1: Observing the Armies on the Battlefield > Bg. 1.1
, as these are the unique names I have per page. You may notice that there are redundancies Bhagavad-gita / Bg. and chapter number.This should be displayed as
Home > Books > Bhagavad-gita > Chapter 1 > Text 1
(label, used in sidebar navigation), or simply asHome > Books > Bg > 1 > 1
(path, default but gets overridden by the presence of name.)At first I thought to suggest a setting, like
<breadcrumb print="label" />
, but then i thought why not add a dedicated breadbrumb meta tag? There are other plugins that does this (croissant), that I used extensively on tens of thousands of pages. I've discarded all other syntax in favor of a single json header for combo, but this is the only thing it doesn't do properly...Anyhow, just thought to submit a ticket to the lottery... :-)