Forums / Templates, Stylesheets, Page Layout / Breadcrumb Replacement

Breadcrumb Replacement

Locked
Results 1 to 8 of 8
This thread is locked. New replies are disabled.
18 Jul 2007, 09:37
#1
stespeak avatar

stespeak

New Zenner

Join Date:
Jun 2007
Posts:
9
Plugin Contributions:
0

Breadcrumb Replacement

Hi I have a customer who wants to remove the breadcrumb and show a text title of the page the user is looking at.

The company who edited her website before me did a lot of stupid things and because of the way they did things, I cannot simply deactivate the breadcrumb it needs to be hardcoded in.

Any help to a language definition I could use or something?

Thanks
18 Jul 2007, 11:33
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Breadcrumb Replacement

What version of Zen Cart?
Why can you not back out the hard code?
a url to the site?
18 Jul 2007, 13:21
#3
stespeak avatar

stespeak

New Zenner

Join Date:
Jun 2007
Posts:
9
Plugin Contributions:
0

Re: Breadcrumb Replacement

http://www.organicswithlove.com/index.php

The company who dealt with this before the company I work for just hacked a lot of things togethor, I've gone through all the template_default files and haven't found anything to substitute the breadcrumb.

You should see a gray bar at the top in the main_page file, it says "Page Title" - I need this to show the title of the page the user is viewing, whether this is a category name or product name etc.
18 Jul 2007, 14:12
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Breadcrumb Replacement

This looks to be an older version and as you did not supply the version as asked I can only guess...

the file includes/templates/template_default/common/tpl_main_page.php

contains the breadcrumb code which you will have to alter to contain your if's & eleses to attain the listing that you want.

Yours currently contains this:
<!-- bof  breadcrumb -->
    <div id="navBreadCrumb">Page Title</div>
<!-- eof breadcrumb -->

The default code is:
<!-- bof  breadcrumb -->
<?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?>
<!-- eof breadcrumb -->
19 Jul 2007, 11:11
#5
stespeak avatar

stespeak

New Zenner

Join Date:
Jun 2007
Posts:
9
Plugin Contributions:
0

Re: Breadcrumb Replacement

Hi Kobra thanks for the quick reply.

I already had access to this code, the problem was the customer wants to display the page a user is browsing as static html text.

Is this already implemented?
19 Jul 2007, 11:23
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Breadcrumb Replacement

As these pages do not exist as static html where one could enter code per page but are created server side dynamically you can not hard code these individually.

You have hard coded the term "Page Title" but this will now display for all pages

What I was suggesting that you replace the standard breadcrumb "echo" code with your own code to only display the category name or the product name with if else validation

And No this is not an admin selection
19 Jul 2007, 11:32
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Breadcrumb Replacement

As Kobra said, you will need to edit tpl_main_page.php with a test statement series to insert the desired static text. Whatever truncated breadcrumbs code is there can be replaced by your code.

You can test for $current_page_base == 'whatever is in the address bar of your desired page', and some other refinements such as $cPath == '##' to determine the text to display.

Template Monster is notorious for hacking & slashing ZC templates and removing standard functions while making their pretty layouts, and this appears to be a very old version to boot.
19 Jul 2007, 16:27
#8
stespeak avatar

stespeak

New Zenner

Join Date:
Jun 2007
Posts:
9
Plugin Contributions:
0

Re: Breadcrumb Replacement

Thanks for the input
I got the desired result by editing the breadcrumb trail class, it was using a .= to add to trail, I just commented out some of the lines and links then edited it so that it only shown the last addition.

Thanks for your help