Jump to content

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

Add "You are Here:" to breadcrumbs Rate Topic   - - - - -

 
  • ikramy
  • Junior Member
  • Trial users
  • Join Date: 09-May 11
  • 87 posts

Posted 19 June 2013 - 12:02 PM #1

Hello,

What is the best way to add a custom text like "You are Here:" before breadcrumbs.

I want breadcrumbs to look like this

You are Here: Home > Computers

Instead of just:

Home > Computers

Thanks

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 19 June 2013 - 01:12 PM #2

Edit the following file:

/skins/yourskin/customer/common_templates/breadcrumbs.tpl

Replace contents with:

<div id="breadcrumbs_{$block.block_id}">
{if $breadcrumbs && $breadcrumbs|@sizeof > 1}
<div class="breadcrumbs clearfix">
  <span>You are Here:&nbsp;</span>
  {strip}
   {foreach from=$breadcrumbs item="bc" name="bcn" key="key"}
	{if $key != "0"}
	 <img src="{$images_dir}/icons/breadcrumbs_arrow.gif" class="bc-arrow" border="0" alt="&gt;" />
	{/if}
	{if $bc.link}
	 <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$bc.link|fn_url}"{if $additional_class} class="{$additional_class}"{/if}  itemprop="url"{if $bc.nofollow} rel="nofollow"{/if}><span itemprop="title">{$bc.title|unescape|strip_tags|escape:"html"}</span></a></span>
	{else}
	 <span>{$bc.title|unescape|strip_tags|escape:"html"}</span>
	{/if}
   {/foreach}
  {/strip}
</div>
{/if}
<!--breadcrumbs_{$block.block_id}--></div>
Save then clear your site cache, via yourstore.com/youradmin.php?cc - ie. add "?cc" to the end of your admin URL.

Note I very much doubt there will be any further releases in V2 nor V3, under normal conditions where future updates are expected, this file would be replaced during the upgrade, so you would have to reapply your changes as there is no Breadcrumbs hook. In saying that...

You could create your own template, in:-

/skins/yourskin/customer/blocks/static_templates/

Name the file my_breadcrumbs.tpl or similar, but must end in ".tpl", use the code as above then you can create a new block and select your new custom template file to replace the current Breadcrumbs block. This should be future proof - but as I said, don't hold your breath for another V2/V3 release.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • cscartrocks
  • Member
  • Members
  • Join Date: 24-Jan 11
  • 1822 posts

Posted 19 June 2013 - 01:37 PM #3

Also you can try to translate this 'Home' to 'You are Here: Home'

One Step Checkout Addon - The ultimate checkout experience
Best CS-Cart SEO addon - CS-Cart SEO Ultimate Addon
PM for 365-day support and custom development service


 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 19 June 2013 - 01:58 PM #4

Also you can try to translate this 'Home' to 'You are Here: Home'

I thought that would do it, too, but changing the language variable value would make the entire "You are Here: Home" the href link to the "Home" page.
Hire StellarBytes for CS-Cart Design & Development Services