Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Specific sideboxe to show on specific page only

    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

  2. #12
    Join Date
    Apr 2011
    Posts
    584
    Plugin Contributions
    0

    Default Re: Specific sideboxe to show on specific page only

    Quote Originally Posted by schoolboy View Post
    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 tried it with the rewritter off so the actual page id shows up but I have the same problem with the sideboxe

    Hidden everywhere even with the page specific .css

  3. #13
    Join Date
    Apr 2011
    Posts
    584
    Plugin Contributions
    0

    Default Re: Specific sideboxe to show on specific page only

    Quote Originally Posted by simon1066 View Post
    I've done a lot of sidebox 'placement' on a website - maybe I can be of some use.

    While I haven't needed to have a sidebox on one page only I have had a sidebox appear on all pages except one, so the code should be able to be switched.

    Is your page a 'define page'? i.e. is there a folder for it in /includes/modules/pages ? if so what is its name?
    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

  4. #14
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

    Default Re: Specific sideboxe to show on specific page only

    Quote Originally Posted by nicksab View Post
    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.

  5. #15
    Join Date
    Apr 2011
    Posts
    584
    Plugin Contributions
    0

    Default Re: Specific sideboxe to show on specific page only

    Quote Originally Posted by simon1066 View Post
    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

  6. #16
    Join Date
    Apr 2011
    Posts
    584
    Plugin Contributions
    0

    Default Re: Specific sideboxe to show on specific page only

    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??

  7. #17
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

    Default Re: Specific sideboxe to show on specific page only

    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.

  8. #18
    Join Date
    Apr 2011
    Posts
    584
    Plugin Contributions
    0

    Default Re: Specific sideboxe to show on specific page only

    Quote Originally Posted by simon1066 View Post
    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.
    I finally got it to work by using this:

    if ($current_page_base == 'san_rafael') {
    $show_blank_sidebox = true;
    } else {
    $show_blank_sidebox = false;
    }

    Thank you for helping and pointing me in the right direction

  9. #19
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

    Default Re: Specific sideboxe to show on specific page only

    Excellent, well done.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Show payment for only specific group pricing customers
    By dionidis in forum Addon Payment Modules
    Replies: 1
    Last Post: 12 Dec 2012, 02:55 PM
  2. Only Show/Offer Item if Specific Dollar Amount is Purchased?
    By Rick5150 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 20 Jul 2012, 08:25 PM
  3. Hide Categories and show only for specific groups
    By gazag in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 5 Dec 2011, 08:28 PM
  4. specific banner to show for specific category
    By vijay in forum Basic Configuration
    Replies: 1
    Last Post: 26 Aug 2009, 01:19 PM
  5. Adding specific sideboxe for EZ pages
    By keygrip in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Dec 2006, 06:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg