Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Tweaking the 'page title' breadcrumb?! Rate Topic   - - - - -

 
  • Damir
  • Junior Member
  • Members
  • Join Date: 31-Jan 06
  • 18 posts

Posted 23 February 2006 - 07:50 PM #1

Is there a way to remove the "Home" from pagetitle when currently on home page??

<title>
{$lang.page_title_text} - 
{foreach from=$breadcrumbs item=i name="bkt"}
	{$i.title|escape}{if !$smarty.foreach.bkt.last} - {/if}
{/foreach}
</title>

for example:


1. when on:

www.yoursite.com

{$lang.page_title_text} - {$lang.company_slogan}



2. when on: (browsing some product)

www.yoursite.com/index.php?target=products&product_id=1

{$lang.page_title_text} -
{foreach from=$breadcrumbs item=i name="bkt"}
{$i.title|escape}{if !$smarty.foreach.bkt.last} - {/if}
{/foreach}

 
  • tjwebdev
  • Junior Member
  • Members
  • Join Date: 17-Feb 06
  • 8 posts

Posted 24 February 2006 - 05:39 PM #2

Not sure if this is what you mean, but for my site I did the following:
<title>
{strip}{foreach from=$breadcrumbs item=i name="bkt"}
			{if $smarty.foreach.bkt.last}
				{if $i.title == "Home"}
					Whatever you want it to say on home page goes here
				{else}
					{$i.title|escape}
				{/if}
			{/if}
		{/foreach}{/strip}
</title>


 
  • Damir
  • Junior Member
  • Members
  • Join Date: 31-Jan 06
  • 18 posts

Posted 25 February 2006 - 08:29 AM #3

:D :) Thanks!!!!

worked like a charm, just tweaked it a bit, and its all working.

<title>
{$lang.page_title_text} -
{strip}{foreach from=$breadcrumbs item=i name="bkt"} 
         {if $smarty.foreach.bkt.last} 
            {if $i.title == $lang.home} 
               {$lang.company_slogan} 
            {else} 
               {$i.title|escape} 
            {/if} 
         {/if} 
      {/foreach}{/strip}
</title>

fixed the "Home" to $lang.home, and added a 'company_slogan' language variable.

this should definately be included in the next version. :D