X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Change bread crumb to start with "Home" not company name (https://forum.x-cart.com/showthread.php?t=45583)

bionuts 02-15-2009 03:15 AM

Change bread crumb to start with "Home" not company name
 
I've just started work on a new store, which uses version 4.2. On my previous store (created with 4.1.11) I edited the location.tpl file to change the bread crumb to show "Home" at the beginning of the list, not the company name.

I'd like to make the same change to the 4.2 store, but find that the code in bread_crumbs.tpl is quite different from the previous version and that the code I used before does not work. Can anyone suggest a way to achieve what I want to do?

Thanks.

Thedae2k 02-15-2009 02:23 PM

Re: Change bread crumb to start with "Home" not company name
 
http://forum.x-cart.com/showthread.php?t=17807&highlight=breadcrumb+home

chris@earmark 02-16-2009 09:09 AM

Re: Change bread crumb to start with "Home" not company name
 

Is this the same process for 4.2 as the previous versions? bionuts question was referring to the change in 4.2.

Victor D 02-17-2009 04:04 AM

Re: Change bread crumb to start with "Home" not company name
 
bread crumbs are located in skin1/customer/bread_crumbs.tpl now

JWait 02-24-2009 05:39 AM

Re: Change bread crumb to start with "Home" not company name
 
The code in bread_crumbs.tpl and location.tpl are different. What would need to be done in bread_crumbs.tpl to change the bread crumb to start with "Home" and not "company name"?

Victor D 02-24-2009 05:47 AM

Re: Change bread crumb to start with "Home" not company name
 
replace {foreach}...{/foreach} block there with this:
Code:

      {foreach from=$location item=l name=location}
        {if $l.1 && !$smarty.foreach.location.last}
          <a href="{$l.1|amp}" class="bread-crumb{if $smarty.foreach.location.last} last-bread-crumb{/if}">{if $smarty.foreach.location.first}Home{else}{$l.0|escape}{/if}</a>
        {else}
          <font class="bread-crumb{if $smarty.foreach.location.last} last-bread-crumb{/if}">{if $smarty.foreach.location.first}Home{else}{$l.0|escape}{/if}</font>
        {/if}
        {if !$smarty.foreach.location.last}
          <span>::</span>
        {/if}
      {/foreach}


ARW VISIONS 02-25-2009 01:38 AM

Re: Change bread crumb to start with "Home" not company name
 
there are 2 files now?

Victor D 02-25-2009 03:15 AM

Re: Change bread crumb to start with "Home" not company name
 
No, for customer there is bread_crumbs.tpl only in 4.2.0
location.tpl is probably used in admin area since there is less changes in comparison with front-end.
IMHO templates stucture is more clear now

mrerotic 03-07-2009 06:13 PM

Re: Change bread crumb to start with "Home" not company name
 
Is there anyway to remove the breadcrumb completely from the homepage? Makes special offers look better. Please let me know.

mrerotic 03-07-2009 06:28 PM

Re: Change bread crumb to start with "Home" not company name
 
or can i show the homepage breadcrumb under the special offers and then in every other page show it back up above like normal? Thanks to all in advance.

cflsystems 03-07-2009 07:30 PM

Re: Change bread crumb to start with "Home" not company name
 
This will remove them from the home page and show on any other page

Code:

      {if $main ne "catalog" || $current_category.category ne ""}
  {include file="customer/bread_crumbs.tpl"}
      {/if}


mrerotic 03-07-2009 07:38 PM

Re: Change bread crumb to start with "Home" not company name
 
thank you sir :)

Thedae2k 03-08-2009 12:00 AM

Re: Change bread crumb to start with "Home" not company name
 
location.tpl

Marc Gold 06-23-2009 08:44 AM

Re: Change bread crumb to start with "Home" not company name
 
Hi

We do not want to show the product as the last item on the breadcrumb, so have commented this out as you will see from the script below.

However, now the last item, isnt the last item in the variable. Hence the seperator always shows and I cant style the last one seperately.

Can anyone help with what changes I need to apply to the PHP to remove the product as the last one in the loop.

Thanks

{if $location}
<div id="location" style="padding-left:10px;">
{foreach from=$location item=l name=location }

{if $l.1 && !$smarty.foreach.location.last}
<a href="{$l.1|amp}" class="bread-crumb {if $smarty.foreach.location.last} last-bread-crumb{/if}">{if $smarty.foreach.location.first}Home{else}{$l.0|esc ape}{/if}</a>
{else}
{* <font class="bread-crumb{if $smarty.foreach.location.last} last-bread-crumb{/if}">{$l.0|escape}</font> *}
{/if}
{if $smarty.foreach.location.last neq "1"}
<span>>></span>
{else}

{/if}
{/foreach}
</div>
{/if}

Victor D 06-24-2009 03:30 AM

Re: Change bread crumb to start with "Home" not company name
 
try this
Code:

{if $location}
  <div id="location" style="padding-left:10px;">
      {foreach from=$location item=l name=location }
     
        {if $l.1 && !$smarty.foreach.location.last}
<a href="{$l.1|amp}" class="bread-crumb {if $smarty.foreach.location.last} last-bread-crumb{/if}">{if $smarty.foreach.location.first}Home{else}{$l.0|esc ape}{/if}</a>
        {else}
{if $main ne 'product'}  <font class="bread-crumb{if $smarty.foreach.location.last} last-bread-crumb{/if}">{$l.0|escape}</font> {/if}
        {/if}
        {if $smarty.foreach.location.last neq "1"}
          <span>>></span>
          {else}
       
        {/if}
      {/foreach}
  </div>
{/if}


dwpers 08-12-2009 09:15 AM

Re: Change bread crumb to start with "Home" not company name
 
To sort of piggy-back on this thread. Is there any possible way to not display the breadcrumbs on the index only? It makes no sense to have breadcrumbs on the index page... just my 2╒

ARW VISIONS 08-12-2009 09:21 AM

Re: Change bread crumb to start with "Home" not company name
 
There must be 100 post on how to do this. Please search. If you can't find it then post a thread.

ARW VISIONS 08-12-2009 09:24 AM

Re: Change bread crumb to start with "Home" not company name
 
as a matter of fact it in the thread already. read up about 4 or 5 posts.. lol

dwpers 08-12-2009 09:26 AM

Re: Change bread crumb to start with "Home" not company name
 
Quote:

Originally Posted by Ashley
There must be 100 post on how to do this. Please search. If you can't find it then post a thread.


Instead of creating 100 + 1 threads on the subject I thought I would ask in an existing thread because I've tried the methods described previously (including the one in THIS thread) and have not had any luck with it. So, instead of chastising me, it would be more productive to only respond if you have something helpful to say. Please don't treat me like I'm a forum newbie just because I'm new to THESE forums.

To clarify this solution does NOT work for me

Code:

{if $main ne "catalog" || $current_category.category ne ""}
  {include file="customer/bread_crumbs.tpl"}
      {/if}


cflsystems 08-12-2009 09:29 AM

Re: Change bread crumb to start with "Home" not company name
 
In skin1/customer/home.tpl replace the call for breadcrumbs with this
Code:

      {if $main ne "catalog" || $current_category.category ne ""}
  {include file="customer/bread_crumbs.tpl"}
      {/if}


dwpers 08-12-2009 09:31 AM

Re: Change bread crumb to start with "Home" not company name
 
Thank you again for your help cflsystems, greatly appreciated.

ARW VISIONS 08-12-2009 09:33 AM

Re: Change bread crumb to start with "Home" not company name
 
at the top of the page there is a search button. Use it love it!!!!

ARW VISIONS 08-12-2009 09:42 AM

Re: Change bread crumb to start with "Home" not company name
 
This code works fine. Did you get it working?

Code:

{if $main ne "catalog" || $current_category.category ne ""}
  {include file="customer/bread_crumbs.tpl"}
      {/if}

[/quote]

dwpers 08-12-2009 09:47 AM

Re: Change bread crumb to start with "Home" not company name
 
Yes look up 3 or 4 posts, in this very exact thread! ;)

All kidding aside, the reason why it didn't work the first time was because I was trying to insert it into the breadcrumb tpl, then tried the locations tpl and not into the home tpl like I should have done.

Everything works stellar now.

ARW VISIONS 08-12-2009 09:51 AM

Re: Change bread crumb to start with "Home" not company name
 
well good. I'm glad you figured it out... n00b ;)

TruVu 02-23-2010 06:18 AM

Re: Change bread crumb to start with "Home" not company name
 
4.3.1 version, instead of using Company Name or Home, how can I change the bread crumbs to use the root category :: sub category :: product listing?


All times are GMT -8. The time now is 08:07 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.