Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / EZ pages sidebox exclusion doesn't seem to work

EZ pages sidebox exclusion doesn't seem to work

Locked

Views: 3,204

Results 21 to 30 of 30
This thread is locked. New replies are disabled.
5 Jul 2008, 11:37 PM
#21
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

EZ pages sidebox exclusion doesn't seem to work

I also meant this piece of code as well. Should I just add the EZ pages id numbers that I want them to show up on?

gjh42:

You can easily set any sidebox to display only on ez-pages, by reversing the test code given above, like this:```php
if (isset($ez_page_id)) {
//code to execute on ez-pages
}

6 Jul 2008, 12:53 AM
#22
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: EZ pages sidebox exclusion doesn't seem to work

Nevermind I get that you just have to rap the code around the same section as listed in the exclusion modification.

6 Jul 2008, 1:29 AM
#23
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: EZ pages sidebox exclusion doesn't seem to work

When I added the Php code:

if (isset($ez_page_id)) {
//code to execute on ez-pages
}

It removed the sidebox not only from ez pages but from my zen-cart site all together.

6 Jul 2008, 1:49 AM
#24
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: EZ pages sidebox exclusion doesn't seem to work

I need to see exactly what that whole part of your file looks like now to advise on why it isn't working.

6 Jul 2008, 2:07 AM
#25
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: EZ pages sidebox exclusion doesn't seem to work

gjh42:

I need to see exactly what that whole part of your file looks like now to advise on why it isn't working.

I highlighted the area I rapped the code around.

<?php /** * editable sidebox - allows an admin-editable sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-08-10 kuroi $ */ // test if box should display $show_editable_sidebox = true; $define_sidebox = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', DEFINE_EDITABLE_SIDEBOX_NAME, 'false'); if ($show_editable_sidebox == true) { require($template->get_template_dir('tpl_editable_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_editable_sidebox.php'); $title = BOX_HEADING_EDITABLE_SIDEBOX; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>
6 Jul 2008, 2:35 AM
#26
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: EZ pages sidebox exclusion doesn't seem to work

Is that really what the file looks like after you added the test code? There is no ez-pages test there now.

6 Jul 2008, 3:08 AM
#27
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: EZ pages sidebox exclusion doesn't seem to work

gjh42:

Is that really what the file looks like after you added the test code? There is no ez-pages test there now.

Just wanted to show the code from the file without the code rapped around it. Here is how the code was added. The rapped around portion is in blue the code it's rapped around is red:

<?php /** * editable sidebox - allows an admin-editable sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-08-10 kuroi $ */ // test if box should display $show_editable_sidebox = true; $define_sidebox = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', DEFINE_EDITABLE_SIDEBOX_NAME, 'false'); if ($show_editable_sidebox == true) { if (isset($ez_page_id)) { //code to execute on ez-pages require($template->get_template_dir('tpl_editable_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_editable_sidebox.php'); $title = BOX_HEADING_EDITABLE_SIDEBOX; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } } ?>

Just can't figure out why it won't show up in EZ pages.

6 Jul 2008, 3:18 AM
#28
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: EZ pages sidebox exclusion doesn't seem to work

Ack - I copied the original code, which had a spelling error in it.
There is no such variable as $ez_page_id; it should be $ezpage_id.

6 Jul 2008, 3:58 AM
#29
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: EZ pages sidebox exclusion doesn't seem to work

It worked, thanks.

4 Aug 2008, 10:12 PM
#30
susb8383 avatar

susb8383

Zen Follower

Join Date:
Feb 2008
Posts:
129
Plugin Contributions:
0

Re: EZ pages sidebox exclusion doesn't seem to work

Hi,

I have the same question. I'm trying to exclude bread crumbs from certain ez pages. I used the corrected if statement from the FAQ mentioned above and edited includes/modules/pages/page/header.php

if (!in_array($ezpage_id,explode(",",'1'))) {
$breadcrumb->add($var_pageDetails->fields['pages_title']);
}

I have an EZ Page with id 1, but the bread crumb still shows on it.

Thanks.