Devomatik
DevCodeF1Com
Published in
4 min readAug 15, 2023

--

TYP03 Breadcrumb Menu / first level no link

When it comes to website navigation, the breadcrumb menu is like the Hansel and Gretel of the digital world. It helps users find their way back home, just like those famous breadcrumbs did in the fairytale. And when it comes to TYPO3, the popular open-source content management system for websites, the breadcrumb menu becomes an essential part of the user experience.

But what happens when you don’t want the first level of your breadcrumb menu to be a link? Maybe you have a specific reason for not wanting users to navigate back to the homepage. Well, fear not! TYPO3 has got you covered.

In TYPO3, you can easily configure your breadcrumb menu to exclude the first level from being a link. This means that users won’t be able to click on the first level and navigate back to the homepage. Instead, they will only be able to click on the subsequent levels of the breadcrumb menu.

So how do you achieve this breadcrumb magic in TYPO3? It’s quite simple, really. All you need to do is add a small snippet of code to your TYPO3 template. Here’s an example:

<lib.breadcrumb>
<lib.breadcrumb.10>
<stdWrap.prepend>
<ul class="breadcrumb">
<li>
<span>Home</span>
</li>
</ul>
</stdWrap.prepend>
</lib.breadcrumb.10>
</lib.breadcrumb>

As you can see, we have added a <span> tag instead of an <a> tag for the first level of the breadcrumb menu. This ensures that the first level is not clickable. You can customize the styling of the <span> tag to match your website's design.

And voila! You now have a TYPO3 breadcrumb menu with a non-clickable first level. Your users can still navigate through the subsequent levels, but they won’t be able to accidentally click on the homepage and get lost in the woods.

So next time you’re working on a TYPO3 website and need to customize the breadcrumb menu, remember this neat little trick. Your users will thank you for it, and you’ll be the hero of the digital fairytale.

References:

Explore our other articles on software development to enhance your skills and stay updated with the latest trends.

--

--