Jump to content

[Solved] Get Breadcrumb To Display On Homepage


Recommended Posts

Hi all,

I have moved the breadcrumb include to the header.tpl (following a thread on here for instructions).
It works, except that on the homepage the breadcrumb does not display.

What i need is the word "home >" to show on the homepage.

So I guess I have 2 choices:

1) Add a conditional to the header.tpl stating "if this is the homepage, display 'home >'"
or
2) Modify the breadcrumb engine so it will display 'home >' when at the homepage.

I think solution 1 would be easier but I don't know how to write {if thispage = homepage}{home >}{/if} in SMARTY.

Any ideas?

I tried passing a variable to smarty from the header.php file thus:

// used to tell breadcrumb to display 'home' on the home page
if($PHP_SELF == "index.php")
{
   $smarty->assign('homePage', 'yes');
}



and within header.tpl i used:

{if $homePage eq 'yes'} Home » {/if}




But this didn't work.

Can anybody help?

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...