![]() |
Remove Location Breadcrumbs from Home
Is there any way that I can prevent displaying the breadcrumb navigation links that appear at the top of each store page just on the store Home page? That's the only page I don't want them to appear.
I presume there's some conditional I might add to the /customer/home.tpl template where this line appears: Code:
{include file="location.tpl"} But I don't know if there's a global var I can check in Smarty that tells me whether or not I'm currently viewing the store home page?? Thanks. |
look in home_main.tpl see the elseif statements. look for the one that includes welcome.tpl
|
Thanks for the tip, Shan.
For anyone interested, this is how I turned off the breadcrumbs on the store homepage only: In the /customer/home.tpl file, replace this line... Code:
{include file="location.tpl"} ...with these lines... Code:
{if $main ne "catalog" or $current_category.category ne ""} Now the breadcrumb navigation links appear on all pages except for the Store homepage. |
A follow up on this - how do we have the breadcrumbs appear *only* on the product pages?
So they don't show up: - on the home page (got that one covered!) - on the category pages - on the non shopping pages we create (like customer service policies and contact us) - on the search page |
Aha! Figured it out!
{if $product.productid ne ""} {include file="location.tpl"} {/if} |
Re: Remove Location Breadcrumbs from Home
Works great for Gold Version 4.1.9. Thanks
|
Re: Remove Location Breadcrumbs from Home
thanks, i've been looking for this.
|
Re: Remove Location Breadcrumbs from Home
Note for products, there may be instances where $products.productid is defined and the user is not on the product page, so it is better to use this for product pages only:
{if $main eq "product"} {include file="location.tpl"} {/if} |
Re: Remove Location Breadcrumbs from Home
{if $main ne "catalog" or $current_category.category ne ""}
What does the 'ne' ? mean |
Re: Remove Location Breadcrumbs from Home
How do you highlight the current page in the breadcrumb trail?
ETA: Found my answer - go to the css and find the .NavigationPath class and change the font color, decoration, etcetera... Any hard coding changes you would like to make would be in the location.tpl file under skin1. |
Re: Remove Location Breadcrumbs from Home
Quote:
Guys, I want the breadcrumb to appear ONLY in the catergories pages and in the products pages. What would be the code? Thanks |
Re: Remove Location Breadcrumbs from Home
{if $main eq "product" OR ($main eq "catalog" AND $current_category.categoryid gt 0)}
{include file="location.tpl"} {/if} |
Re: Remove Location Breadcrumbs from Home
Thanks to Kshock for such easy to follow directions for a newbie!
|
Re: Remove Location Breadcrumbs from Home
Thanks JON!
|
Re: Remove Location Breadcrumbs from Home
Thanks for the Mod, should be standard on x-cart gives the first page a really good look
Thanks again Colin www.jollybranding.co.uk www.coolblades.co.uk |
Re: Remove Location Breadcrumbs from Home
There are things that should be standard, and things that shouldn't. This is one of the latter. It is easy enough to modify the way it is if you want, and would be difficult to figure out where to add it if you don't think it gives the first page "a really good look".
And to Ashley... ne is "not equal". |
Re: Remove Location Breadcrumbs from Home
Thanks! Kshock http://forum.x-cart.com/images/statusicon/user_offline.gif vbmenu_register("postmenu_83256", true);
U are better than the support desk! |
Re: Remove Location Breadcrumbs from Home
Quote:
Ummm... I made that post in February. I figured it out since then. but thanks anyways. 8)8)8) |
Re: Remove Location Breadcrumbs from Home
what if you wanted to replace the breadcrumbs with the word "Welcome!" on the home page?
{if $main ne "catalog" or $current_category.category ne ""} {include file="location.tpl"} {/if} |
Re: Remove Location Breadcrumbs from Home
{if $main eq "catalog" and $current_category.category eq ""}
Welcome! {/if} |
Re: Remove Location Breadcrumbs from Home
Thanks Balinor, once again...
I am having a problem when I have the following: {if $main ne "catalog" or $current_category.category ne ""} {include file="shared/navigation/breadcrumbs.tpl"}{/if} {if $main ne "catalog" or $current_category.category ne ""} Welcome! {/if} "Welcome" does not show, any ideas? |
Re: Remove Location Breadcrumbs from Home
Please look at my code again, you didn't copy it exactly.
|
Re: Remove Location Breadcrumbs from Home
Yes I did, but then the breadcrumbs do not show up on the other pages. This is why I need it changed.
THnaks |
Re: Remove Location Breadcrumbs from Home
What do you want to do? Show welcome on the home page and location breadcrumbs on the other pages? If so, use this:
{if $main eq "catalog" and $current_category.category eq ""} Welcome!{else}{include file="shared/navigation/breadcrumbs.tpl"}{/if} |
Re: Remove Location Breadcrumbs from Home
To add on to all of this, how can I get breadcrumbs to show up only on product pages and sub-category pages?
At the moment, for products only, I have: {if $main eq "product"} {include file="location.tpl"} {/if} Thanks! |
Re: Remove Location Breadcrumbs from Home
Quote:
Where do I add this code? |
Re: Remove Location Breadcrumbs from Home
you replace this
{include file="location.tpl"} with this {if $main eq "product" OR ($main eq "catalog" AND $current_category.categoryid gt 0)} {include file="location.tpl"} {/if} location.tpl is probably in home.tpl |
Re: Remove Location Breadcrumbs from Home
Quote:
Thanks I will try that. I guess it is the same place where you remove the breadcrumb for home, which I already did and it looks so much better.. |
Re: Remove Location Breadcrumbs from Home
Thanks for all contributions in this thread. Works like a charm and no way I would have been able to figure that out myself.
|
All times are GMT -8. The time now is 04:59 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.