Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / tpl_ezpages_bar_header.php help needed.

tpl_ezpages_bar_header.php help needed.

Views: 1,208

Results 1 to 6 of 6
30 Nov 2013, 4:19 AM
#1
charles_persinger avatar

charles_persinger

New Zenner

Join Date:
Nov 2013
Location:
Charleston, WV
Posts:
12
Plugin Contributions:
0

tpl_ezpages_bar_header.php help needed.

The problem I'm having is that the EZpages header is showing a 1 after my links in the header. I've looked at and tried to modify the tpl_ezpages_bar_header file without success to get rid of it. It will show 1 for each link I have enabled except for the last link enabled. Below is the code I pulled from Firebug and also the code from the tpl_expages_bar_header.php. I'm thinking there is going to have to be a major edit of this file as I've tried to get rid of the $i from the echo statements and it has not had the desired effect. While I can modify and do slight edits I'm in no way well versed in php so any help is much appreciated.

Feel free to call me stupid if you are willing to help.

Pulled from Firebug.

<div id="navEZPagesTop"> <ul> <li> <a href="http://elkriveroutdoors.com/index.php?main_page=page&id=15">About Us</a> </li> 1 <li> <a href="http://elkriveroutdoors.com/index.php?main_page=shippinginfo">Shipping & Returns</a> </li> 1 <li> <a href="http://elkriveroutdoors.com/index.php?main_page=contact_us">Contact Us</a> </li>

PHP code

<?php if (sizeof($var_linksList) >= 1) { ?> <div id="navEZPagesTop"> <ul> <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) {

?>

<li><a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a></li> <?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . "\n"; ?> <?php } ?>
</ul>
</div> <?php } ?>
30 Nov 2013, 5:15 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: tpl_ezpages_bar_header.php help needed.

charles.persinger:

The problem I'm having is that the EZpages header is showing a 1 after my links in the header. I've looked at and tried to modify the tpl_ezpages_bar_header file without success to get rid of it. It will show 1 for each link I have enabled except for the last link enabled. Below is the code I pulled from Firebug and also the code from the tpl_expages_bar_header.php. I'm thinking there is going to have to be a major edit of this file as I've tried to get rid of the $i from the echo statements and it has not had the desired effect. While I can modify and do slight edits I'm in no way well versed in php so any help is much appreciated.

Feel free to call me stupid if you are willing to help.

Pulled from Firebug.

<div id="navEZPagesTop"> <ul> <li> <a href="http://elkriveroutdoors.com/index.php?main_page=page&id=15">About Us</a> </li> 1 <li> <a href="http://elkriveroutdoors.com/index.php?main_page=shippinginfo">Shipping & Returns</a> </li> 1 <li> <a href="http://elkriveroutdoors.com/index.php?main_page=contact_us">Contact Us</a> </li>

PHP code

<?php if (sizeof($var_linksList) >= 1) { ?> <div id="navEZPagesTop"> <ul> <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) {

?>

<li><a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a></li> <?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . "\n"; ?> <?php } ?>
</ul>
</div> <?php } ?>

Looks like need to follow up on the value for: EZPAGES_SEPARATOR_HEADER. It looks like it may be set to 1 or true.

30 Nov 2013, 5:15 AM
#3
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: tpl_ezpages_bar_header.php help needed.

ummm isn't that the ezpages divider that is set in admin

Admin --> Configuration --> EzPages Settings

EZ-Pages Header Link Separator

try setting it to

 

30 Nov 2013, 6:28 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: tpl_ezpages_bar_header.php help needed.

nigelt74:

ummm isn't that the ezpages divider that is set in admin

Admin --> Configuration --> EzPages Settings

EZ-Pages Header Link Separator

try setting it to

 

Upon looking further, yes, is a setting in the EZ-Pages Settings as described above. Default is:

 :: 

30 Nov 2013, 7:14 PM
#5
charles_persinger avatar

charles_persinger

New Zenner

Join Date:
Nov 2013
Location:
Charleston, WV
Posts:
12
Plugin Contributions:
0

Re: tpl_ezpages_bar_header.php help needed.

Thank you MC your first post got me thinking and I removed <?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . ; ?> from tpl_ezpages_bar_header.php which fixed the problem. After seeing Niglet's post I went into the admin and sure enough the seperator was set to 1, so I put the original code back in place and updated that setting to nothing and it removed them. Thank you both for your advice and knowledge it is much appreciated.

30 Nov 2013, 9:34 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: tpl_ezpages_bar_header.php help needed.

charles.persinger:

Thank you MC your first post got me thinking and I removed <?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . ; ?> from tpl_ezpages_bar_header.php which fixed the problem. After seeing Niglet's post I went into the admin and sure enough the seperator was set to 1, so I put the original code back in place and updated that setting to nothing and it removed them. Thank you both for your advice and knowledge it is much appreciated.

No problem... Hopefully are learning a little as you go along. Items in code that are all bold are definitions, which either show up in a file or in the database. ZC has had a nifty tool since version 1.2 that allows searching the files and the database. It's called Developer's Tool Kit (DTK) and is found under the tools option in the admin panel. With it and a few other basic tools, you can find and change anything about how ZC runs and looks. Good luck on your future endeavors.