Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / breadcrumb: I forgot where the php is!

breadcrumb: I forgot where the php is!

Locked

Views: 2,754

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
16 Oct 2010, 9:27 PM
#1
finlander avatar

finlander

Zen Follower

Join Date:
Oct 2010
Location:
Idaho
Posts:
293
Plugin Contributions:
0

breadcrumb: I forgot where the php is!

Yesterday I noticed that there are *two *spaces after the breadcrumb separator and one space before it. I am aware that Admin Layout Settings control (with the default setting) one space before the separator and one space after it. I don't want to make my change in Admin, though.

In the php file that controls the breadcrumb trail for all store pages is where you'll find the additional space. It looks like this:

<div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR)[B];[/B] ?></div>

I tested it by removing and re-inserting that space after the semi-colon, and now cannot seem to remember which php file this is. The tpl main_page php file doesn't seem to be controlling it. Am I going bonkers? Thank you.

16 Oct 2010, 10:55 PM
#2
finlander avatar

finlander

Zen Follower

Join Date:
Oct 2010
Location:
Idaho
Posts:
293
Plugin Contributions:
0

Re: breadcrumb: I forgot where the php is!

I think the extra space is lingering in the place where this value:

BREAD_CRUMBS_SEPARATOR

is actually defined.

Anyone know where that is?

16 Oct 2010, 11:20 PM
#3
finlander avatar

finlander

Zen Follower

Join Date:
Oct 2010
Location:
Idaho
Posts:
293
Plugin Contributions:
0

Re: breadcrumb: I forgot where the php is!

okay, best I can figure:

Each crumb of the trail renders in the browser as a new line of code, so the line break created in code and rendered in the browser is the only cause of the space?

Here is an example of this extra space appearing (I have removed the non-breaking spaces that wrap the separator symbol in Admin Layout):

Home:: Login:: Password Forgotten

So the space between :: and the capital L and capital P is simply caused by the line break in how the code is created? Here is the source code of the browser page, w/o wrapping in the text editor:

<!-- bof breadcrumb -->
<div id="navBreadCrumb">  <a href="http://www.vintage-adventures.com/">Home</a>::

<a href="https://www.vintage-adventures.com/index.php?main_page=login">Login</a>::
Password Forgotten

</div> <!-- eof breadcrumb -->