Results 1 to 10 of 19

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Posts
    584
    Plugin Contributions
    0

    Default Specific sideboxe to show on specific page only

    Hey everyone,

    www.royal-fleur.com

    I would to have a specific sideboxe appear on one specific page only.

    I would like to have blank_sideboxe to appear only on www.royal-fleur/forist-sa-rafael-ca page only.

    I look thru the forum and tried a few things but no luck. All i Found mostly was for ez page...

    I tried the following code in modules/sideboxe/blank_sideboxe.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

    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);
    }
    ?>

    but it make the whole website disappear when i turn the sideboxe on. Only the header shows up

    Please help me with this as I am a newbie when it comes to php programming

    Thank you in advance

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Specific sideboxe to show on specific page only

    The basic principle is here - you'll have to adjust the code to reflect the page where you want to have the box display:

    http://www.zen-cart.com/content.php?...ll-other-pages

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

    Default Re: Specific sideboxe to show on specific page only

    Quote Originally Posted by stevesh View Post
    The basic principle is here - you'll have to adjust the code to reflect the page where you want to have the box display:

    http://www.zen-cart.com/content.php?...ll-other-pages
    I read this tutorial but I am confused. This is for the home page

    In my case, I want the sideboxe to show only on one page which is not the main page or an ez page

    How do I modify this statement:

    if ($this_is_home_page) {
    $show_featured = true;
    } else {
    $show_featured = false;
    }

    so my sideboboxe shows up on the following page: www.royal-fleur.com/florist-san-rafael-ca only

    The file name for this page is SAN_RAFAEL

    Any help is more than welcome

    Thank you

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Specific sideboxe to show on specific page only

    CSS may be easier...

    If you want the sidebox to be hidden on ALL pages EXCEPT one specific page, then you create a declaration in the main stylesheet that says:

    #mySidebox {display:none;}

    Then you create a PAGE-SPECIFIC stylesheet (for whatever page you want that sidebox on) and change the declaration to:

    #mySidebox {display:block;}

    Look at the stylesheet README file in the main CSS folder (probably classic/css) for instructions on creating page-specific stylesheets.

    SEE IT IN ACTION (sort of)...

    GRAPHIC SIDEBOX is ON

    GRAPHIC SIDEBOX is OFF
    20 years a Zencart User

  5. #5
    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
    CSS may be easier...

    If you want the sidebox to be hidden on ALL pages EXCEPT one specific page, then you create a declaration in the main stylesheet that says:

    #mySidebox {display:none;}

    Then you create a PAGE-SPECIFIC stylesheet (for whatever page you want that sidebox on) and change the declaration to:

    #mySidebox {display:block;}

    Look at the stylesheet README file in the main CSS folder (probably classic/css) for instructions on creating page-specific stylesheets.

    SEE IT IN ACTION (sort of)...

    GRAPHIC SIDEBOX is ON

    GRAPHIC SIDEBOX is OFF

    I dont think CSS would work in my case. I planning on adding 5 specific sideboxe to 5 unique page so it would prob increase page load time.

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Specific sideboxe to show on specific page only

    Quote Originally Posted by nicksab View Post
    so it would prob increase page load time.
    The additional CSS is a single declaration... Maybe increases page load time by seven-trillionths of a second...
    20 years a Zencart User

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Specific sideboxe to show on specific page only

    One problem may be that you have some stupid URL re-writer in place...

    What is your objective for using a URL re-writer... they make life more challenging than it needs to be...
    20 years a Zencart User

  8. #8
    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
    One problem may be that you have some stupid URL re-writer in place...

    What is your objective for using a URL re-writer... they make life more challenging than it needs to be...
    Even if I turn off the url rewriter, it does not work.

    The correct page would be http://www.royal-fleur.com/index.php...age=san_rafael

    How do i modify the code for it?

    I don t want to use css because i would be adding too many specific page sideboxe and it will increase my main page load time which already slow from my swf soon to be jsquery.

    Thank for your help with this

 

 

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