Hi, I have breadcrumbs on my site and my main issue is on some pages I have a descriptive page title. So on these pages with the breadcrumb the titles are very long. I was wondering how I could add in an if statement so that if a another tag is specified in the md file that should overrule the title name but only on the breadcrumbs.
Below is the breadcrumb twig code.
{% set crumbs = breadcrumbs.get() %}
{% set breadcrumbs_config = config.plugins.breadcrumbs %}
{% set divider = breadcrumbs_config.icon_divider_classes %}
{% if crumbs|length > 1 or breadcrumbs_config.show_all %}
<div class="row clearfix mb">
<div class="breadcrumbIn">
<div id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<ul>
{% if breadcrumbs_config.icon_home %}
<li><a href="/" class="toptip" title="Homepage"> <i class="icon-home"></i> </a></li>
{% endif %}
{% for crumb in crumbs %}
{% if not loop.last %}
<li><a href="{{ crumb.url }}/" itemprop="url"><span itemprop="title">{{ crumb.menu }}</span></a></li>
{% else %}
{% if breadcrumbs_config.link_trailing %}
<a href="{{ crumb.url }}" itemprop="url"><span itemprop="title">{{ crumb.menu }}</span></a>
{% else %}
<li><span itemprop="title">{{ crumb.menu }}</span></li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
</div><!-- breadcrumb -->
</div><!-- row -->
This could output Home > Discography > A - Artists Discography > Aman Hayer Discography Albums > Album Name
I would ideally on some of those .md files create a new header variable called breadcrumb and this should be used if it exists in stead of the page title. If this does not exist then it should of course show the page title.