Hi,
The example below is in French but the problem can be encountered with other languages :
One top menu :
- Name= L'association
- link= nolink
- url= l-association
Node content :
- Name= Présentation
- url= /l-association/presentation
" Include invalid paths alias as plain-text segments" = checked
"Use menu title when available" = checked
The rendered Breadcrumb :
L association / Présentation
The module use the path and not the menu link name, "L association" means nothing in French without the quote.
This module is useless in French with nolink menu items because French often use quotes.
Will this problem be taken care of by this great module or should we fall back on the menu_breadcrumb module?
Thank you
Issue fork easy_breadcrumb-3263117
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
gwvoigtSame as If I'm using an & as in a menu item that is a named "Programs & Courses". The path will be .../programs-courses/... and the breadcrumb will render "... / Programs Courses / ...". If it is a , it should use the menu link name and render "... / Programs and Courses / ...".
Comment #4
sunlixSame with this structure
URL:
/service-departments/service-1<button>)Expected: Service & Departments / Service 1
Got: service deparments / Service 1
Comment #5
admirlju commentedThere is a workaround, but it's not the best. This should really get implemented.
I'll explain the workaround, but the problem is if you have a lot of menus and submenus with special characters it's a lot of work.
You have
Paths to replace with custom breadcrumbsconfiguration, and can use it like this:Example for node path (/articles/random/ (where I'll add a special character in random):
regex!/articles/random/\d :: Article | /articles :: Ran'dom | /articles/random :: <title>Example for view/page path (/articles/random)
/articles/random :: Article | /articles :: Ran'domFor your French example, it would probably look something like this, you'd need to have 3 entries and this is why it's annoying:
I'm demonstrating here if the content is represented with ID in the URL (if you use a string you can replace
\dwith.+):/l-association :: L'association// Home > L'association/l-association/presentation :: L'association | /l-association :: Présentation// Home > L'association > Présentationregex!/l-association/presentation/\d :: L'association | /l-association :: Présentation | /l-association/presentation :: <title>// Home > L'association > Présentation > Content titleThe last entry needs to use regex because it captures every possible combination. The
<title>tag will use the content title, so it should correctly use special characters.To understand better, the first part (up to the first
::separator) is pattern matching, this can either be string matching or regex matching.From this point on you are building a custom breadcrumb,
::separator is used to separate text and URL to use on that text,|separates different crumbs. You can leave out the URL as I do with the last element. So:<first text> :: <first url> | <second text> :: <second url> | <n-th text>Comment #6
seutje commentedCan't reproduce on 2.0.9.
Created 2 nested pages with both "'" and "&" in the title and both rendered fine in the breadcrumb.