[SOLVED] MenuManager > action breadcrumbs

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

[SOLVED] MenuManager > action breadcrumbs

Post 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="#"> &raquo; </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?
Last edited by essexboyracer on Mon Jun 17, 2013 5:09 pm, edited 1 time in total.
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: ManuManager > action breadcrumbs

Post by staartmees »

Why don't you use the tag breadcrumbs? It comes with your cmsms
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: ManuManager > action breadcrumbs

Post by psy »

Remove or change the &raquo; to whatever you want. That's the code to display a chevron.
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

Re: ManuManager > action breadcrumbs

Post 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 &raquo; anywhere
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: ManuManager > action breadcrumbs

Post by staartmees »

I don't think breadcrumbs is depreciated because it still comes with version 1.11.7
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

Re: ManuManager > action breadcrumbs

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: ManuManager > action breadcrumbs

Post 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}:&nbsp;
{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}&nbsp;
{elseif ($node->url == '' or $node->url == '#') && $node->type != 'sectionheader'}
&raquo;&nbsp;
{elseif $node->type == 'sectionheader'}
{$node->menutext}&nbsp;
{else}
<a href="{$node->url}" title="{$node->menutext}">{$node->menutext}</a>&nbsp;
{/if}
</span>
{/foreach}
</div>
{/strip}
{/if}
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

Re: ManuManager > action breadcrumbs

Post 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
Post Reply

Return to “CMSMS Core”