Issue with <nolink> and specials char

Created on 8 February 2022, almost 3 years ago
Updated 7 November 2023, about 1 year ago

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

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France yom

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany sunlix Wesel

    Same with this structure

    URL: /service-departments/service-1

    • Service & Departments (Link: <button>)
      • - Service 1
      • - Service 2

    Expected: Service & Departments / Service 1
    Got: service deparments / Service 1

  • There 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 breadcrumbs configuration, 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'dom

    For 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 \d with .+):
    /l-association :: L'association // Home > L'association
    /l-association/presentation :: L'association | /l-association :: Présentation // Home > L'association > Présentation
    regex!/l-association/presentation/\d :: L'association | /l-association :: Présentation | /l-association/presentation :: <title> // Home > L'association > Présentation > Content title

    The 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>

Production build 0.71.5 2024