[SOLVED] Breadcrumbs Tag and Show in Menu

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
visualharmony
Forum Members
Forum Members
Posts: 30
Joined: Tue Dec 02, 2008 1:20 am
Location: Ocala, Florida

[SOLVED] Breadcrumbs Tag and Show in Menu

Post by visualharmony »

I'm having an issue with the Breadcrumbs tag where it isn't showing the full path to the current page for pages that are children of a page that has "Show in Menu" unchecked in the page's Options tab.

So, instead of:

Home >> Parent page with Show in Menu Unchecked >> Child of page with Show in Menu Unchecked

I get:

Home >> Child of page with Show in Menu Unchecked

Is there something I am missing or is this how breadcrumbs should work.  How could I work around this to get the breadcrumbs to display the links for the full path?

TIA,
Jack
Last edited by visualharmony on Wed Mar 24, 2010 6:05 pm, edited 1 time in total.
Visual Harmony, Website Design Blog

To the Devs: Thanks for making CMS Made Simple. It is great and getting better all the time!
visualharmony
Forum Members
Forum Members
Posts: 30
Joined: Tue Dec 02, 2008 1:20 am
Location: Ocala, Florida

Re: Breadcrumbs Tag and Show in Menu

Post by visualharmony »

Forgot to say that the CMSMS version is 1.6.6 "Bonde."
Visual Harmony, Website Design Blog

To the Devs: Thanks for making CMS Made Simple. It is great and getting better all the time!
Peciura

Re: Breadcrumbs Tag and Show in Menu

Post by Peciura »

For this trick you will need module CGSimpleSmarty. Paste this template instead of "Breadcumbs" tag

Code: Select all

{assign var='page_position' value='.'|explode:$position}
{assign  var='temp_alias' value=$page_alias}

{foreach from=$page_position name='breadcumbs'  item=not_used}
	{capture assign='temp_var'}breadcumb_{math equation="x-y" x=$smarty.foreach.breadcumbs.total y=$smarty.foreach.breadcumbs.index}{/capture}
	{assign var=$temp_var value=$temp_alias}
	{$cgsimple->get_parent_alias($temp_alias,'temp_parent')}
	{assign var='temp_alias' value=$temp_parent}
{/foreach}

{foreach from=$page_position name='breadcumbs'  item=not_used}
	{capture assign='temp'}{literal}{${/literal}breadcumb_{$smarty.foreach.breadcumbs.iteration}{literal} }{/literal}{/capture}
	{capture assign='temp_page_alias'}{eval var=$temp}{/capture}
	{if !$smarty.foreach.breadcumbs.last}
	{cms_selflink page=$temp_page_alias|trim}
		 >> 
	{else}
		{$cgsimple->get_page_title()}
	{/if}
{/foreach}
visualharmony
Forum Members
Forum Members
Posts: 30
Joined: Tue Dec 02, 2008 1:20 am
Location: Ocala, Florida

Re: Breadcrumbs Tag and Show in Menu

Post by visualharmony »

Thank you, Peciura!  Worked perfectly!  ;D
Visual Harmony, Website Design Blog

To the Devs: Thanks for making CMS Made Simple. It is great and getting better all the time!
Post Reply

Return to “CMSMS Core”