0

I would like not to display the empty news detail page in the breadcrumb. I added the breadcrumb as explained here. Then I disabled the "Page enabled in menus" as recommended on the same page. But the breadcrumb still shows like:

Home > News > Single news > This is the name of the news

But it should be like this:

Home > News > This is the name of the news

Any ideas?


SOLUTION:

I am using FLUIDTEMPLATE with MenuProcessor with the following setup:

...
30 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
30 {
   special = rootline
   special.range = 0|-1
   includeNotInMenu = 0
   as = breadcrumbMenu
}

40 = GeorgRinger\News\DataProcessing\AddNewsToMenuProcessor
40 {
   menus = breadcrumbMenu
   includeNotInMenu = 0
}
...

When including includeNotInMenu = 0 and enable Page enabled in menus in the page settings of the News detail page the page itself won't be shown in the breadcrumb.

It is shown like this:

Home > News > This is the name of the news
Urs Bo
  • 308
  • 1
  • 11
  • Out of my head. Aa breadcrumb is a type of menu you might be able to use "excludeUids" here and set your detail page to be excluded. As an alternativ you can try to modify the relevant Fluid Template and exlcude this page there by checking its name or UID. – Michael Hitzler Mar 08 '23 at 09:16
  • Thanks, the solution that worked is: "includeNotInMenu = 0" in the menu processor. – Urs Bo Mar 09 '23 at 10:10

2 Answers2

1

Normally it's enough to change the detail page to not in Menu.
As the bread crumb also is a menu there will no link to that page be rendered.

Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38
  • Thanks for the hint. It works with "not in menu" but only if I also use "includeNotInMenu=0", see solution. – Urs Bo Mar 09 '23 at 10:09
1

It depends on how your breadcrumb is being rendered, as there are many ways to do it in TYPO3. The default in any of these standard implementation modes in TYPO3 is to respect the flag "Page enabled in menus", so that these pages do not appear in the breadcrumbs (also known as "rootline" in the TYPO3 world).

But there are switches to turn this behaviour off, so you might want to hunt for them.

  1. Either you are using straight old-school TypoScript and doing this:
lib.rootline = HMENU
lib.rootline {
    special = rootline
    ...

Make sure you have not included includeNotInMenu=1 in this setup (see docs).

  1. Or you are using a FLUIDTEMPLATE with a MenuProcessor to be able to render your breadcrumb in Fluid:
  50 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
  50 {
    special = rootline
    special.range = 1|-1
    as = breadcrumbs
    titleField = nav_title // title
  }

Also here the setting would be includeNotInMenu=1 to search for, which you don't want.

  1. Or you are using vhs extension and the provided Breadcrumb ViewHelper directly in your Fluid template:
<v:page.breadCrumb as="menu">
   ...

In this case, make sure you are not using the showHiddenInMenu="true" attribute.

In case your breadcrumb are being rendered in any other way, you might need to adjust your question to include the relevant part of your code so that we can formulate a more precise answer.

Ernesto Baschny
  • 436
  • 3
  • 5
  • Thank you very much, the solution is "includeNotInMenu=0" as I use the MenuProcessor in FLUIDTEMPLATE (your #2). I update my question. – Urs Bo Mar 09 '23 at 10:07