I still maintain the URL rewriter is an issue here... but even so, that's your choice:
Look here: http://www.zen-cart.com/showthread.php?44364
I still maintain the URL rewriter is an issue here... but even so, that's your choice:
Look here: http://www.zen-cart.com/showthread.php?44364
20 years a Zencart User
Yes the page was created on the about_us page mod so it is a define page. there is a folder for it in .../includes/modules/pages.
The name of the folder is san_rafael and the folder contains the header.php file for this specific page.
Thank you for your help on this issue
The code I use if I want to have blank_sidebox NOT appear on san_rafael page is:
if (in_array($current_page_base,explode(",",'san_rafael')) ) {
$$show_static_blank_sidebox = false;
} else {
$show_static_blank_sidebox = true;
}
So I think that to have this sidebox ONLY appear on san_rafael page I would replace your code in modules/sideboxes/blank_sidebox.php:
// test if box should display
$show_blank_sidebox = true;
if (in_array($_GET['main_page'], array(FILENAME_SAN_RAFAEL))) {
$show_blank_sidebox = true
} else
$show_blank_sidebox = false
with:
// test if box should display
if (in_array($current_page_base,explode(",",'san_rafael')) ) {
$$show_static_blank_sidebox = true;
} else {
$show_static_blank_sidebox = false;
}
It shouldn't matter that the url for san_rafael has been rewritten, I use rewrites (CEON mapping) and don't seem to have an issue.
As I type I notice that your code seems to be missing some brackets:
if (in_array($_GET['main_page'], array(FILENAME_SAN_RAFAEL))) {
$show_blank_sidebox = true
} else {
$show_blank_sidebox = false
}
Perhaps that was the problem?
Hope it works.
Thank you for helping me with this.
I tried your code but it does not work.
If i use
if (in_array($current_page_base,explode(",",'san_rafael')) ) {
$$show_static_blank_sidebox = true;
} else {
$show_static_blank_sidebox = false;
}
The blank_sideboxes does not show anywhere.
And if i try:
if (in_array($current_page_base,explode(",",'san_rafael')) ) {
$$show_static_blank_sidebox = false;
} else {
$show_static_blank_sidebox = true;
}
The blank_sidebox shows everywhere.
I put these code in /includes/modules/sideboxes/smooth_green/blank_sidebox.php
Any ideas what could be the problem?
Thank you
If I use this code
if (in_array($current_page_base,explode(",",'san_rafael')) ){
$$show_blank_sidebox = false;
} else {
$show_blank_sidebox = true;
}
if ($show_blank_sidebox == true) {
require($template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
$title = BOX_HEADING_BLANK_SIDEBOX;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
?>
The sideboxe shows everywhere except on san_rafael.
If I change the code to
if (in_array($current_page_base,explode(",",'san_rafael')) ){
$$show_blank_sidebox = true;
} else {
$show_blank_sidebox = false;
}
if ($show_blank_sidebox == true) {
require($template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
$title = BOX_HEADING_BLANK_SIDEBOX;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
?>
It does not show anywhere.
What am I missing here??
Sorry, all out of ideas I'm afraid - as I say it works for me.
I'll have to refer you back to schoolboy's answers, and also to the link he provided to another thread - which is where I got my information from.
Last edited by simon1066; 17 Jul 2012 at 07:00 AM.
Excellent, well done.