Page 1 of 1
[SOLVED] MenuManager > action breadcrumbs
Posted: Thu Jun 13, 2013 9:52 am
by essexboyracer
I am trying to get menu manager to produce breadcrumbs. I can partially do this by using:
Code: Select all
{menu action="breadcrumbs" template="bcrumb"}
but the output produces the following which has unwanted double chevrons. Setting
delimiter="" throws an error and using
{cms_breadcrumbs} doesn't give me any control over the output - I need it in a list as the site is based on twitter bootstrap.
Code: Select all
<ul class="breadcrumb">
<li><a href="http://www.sitename.co.uk/"> Home </a></li>
<li><a href="#"> » </a>
</li><li class="activeparent"> <a class="activeparent" href="http://www.sitename.co.uk/testimonials/2013-testimonials"> Testimonials </a></li>
</ul>
I cant seem to get breadcrumbs where I can control the HTML output correctly, any ideas?
Re: ManuManager > action breadcrumbs
Posted: Thu Jun 13, 2013 10:52 am
by staartmees
Why don't you use the tag breadcrumbs? It comes with your cmsms
Re: ManuManager > action breadcrumbs
Posted: Thu Jun 13, 2013 11:53 am
by psy
Remove or change the » to whatever you want. That's the code to display a chevron.
Re: ManuManager > action breadcrumbs
Posted: Thu Jun 13, 2013 12:07 pm
by essexboyracer
The tag breadcrumbs is depreciated and doesn't offer any control over HTML output.
The template
bcrumb looks like this:
Code: Select all
{if $count > 0}
<ul class="breadcrumb">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->current == true}
<li><a href="{$node->url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{elseif $node->parent == true && $node->depth == 1 and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="activeparent"> <a href="{$node->url}" class="activeparent"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{else}
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
I might be going mad, but I can't see for the life of me see
» anywhere
Re: ManuManager > action breadcrumbs
Posted: Thu Jun 13, 2013 12:39 pm
by staartmees
I don't think breadcrumbs is depreciated because it still comes with version 1.11.7
Re: ManuManager > action breadcrumbs
Posted: Thu Jun 13, 2013 1:05 pm
by essexboyracer
From 1.11.7: "DEPRECATED Use {cms_breadcrumbs} now!"
Yes you can still use it, but support for it may disappear with future upgrades to the core
Re: ManuManager > action breadcrumbs
Posted: Thu Jun 13, 2013 3:37 pm
by Dr.CSS
The default breadcrumb menu template looks like this, are you sure it uses the one you posted..?
{if isset($nodelist)}
{strip}
<div class="breadcrumb">
{$starttext}:
{foreach from=$nodelist item='node'}
{assign var='spanclass' value='crumb'}
{assign var='extraspanclass' value=''}
{if $node->current == true}
{assign var='extraspanclass' value=' current'}
{/if}
<span class="{$spanclass|cat:$extraspanclass}">
{if $node->current == true}
{$node->menutext}
{elseif ($node->url == '' or $node->url == '#') && $node->type != 'sectionheader'}
»
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{else}
<a href="{$node->url}" title="{$node->menutext}">{$node->menutext}</a>
{/if}
</span>
{/foreach}
</div>
{/strip}
{/if}
Re: ManuManager > action breadcrumbs
Posted: Fri Jun 14, 2013 1:05 pm
by essexboyracer
I wasn't using the breadcrumb template, I was using one of the others. Have reverted to importing the breadcrumb template and it appears to be working fairly ok (got some empty LI elements).
Now to microdata the breadcrumbs...
Thank you all