Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Sep 2007
    Posts
    60
    Plugin Contributions
    0

    Default Exclude sideboxes from home page only?

    I can't seem to find out what the proper code is to insert here.

    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;}

    I'm wanting to hide all sideboxes on the right side but only on the home page/main page. I'm using a modified AppleZen template that restricts sideboxes to only display on the right side. When I tried to insert the following...

    if ($this_is_home_page) {
    $flag_disable_left = true;

    I get a parce error. Any help would be greatly appreciated.

    Vood

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Exclude sideboxes from home page only?

    http://www.zen-cart.com/forum/showthread.php?t=52941
    Similar request shown in thread above

  3. #3
    Join Date
    Sep 2007
    Posts
    60
    Plugin Contributions
    0

    Default Re: Exclude sideboxes from home page only?

    Thanks for the thread ref. but it still isn't working for me. When I replace the code, I'm still seeing the Categories, Reviews and Information boxes on the right side. Sorry to be a pain.

    Vood

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Exclude sideboxes from home page only?

    Quote Originally Posted by Vood View Post
    I'm wanting to hide all sideboxes on the right side

    ....

    if ($this_is_home_page) {
    $flag_disable_left = true;

    ...
    Did you choose "right" in both places?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Sep 2007
    Posts
    60
    Plugin Contributions
    0

    Default Re: Exclude sideboxes from home page only?

    Quote Originally Posted by DrByte View Post
    Did you choose "right" in both places?
    I'm not sure what you mean by "in both places". I cut the code from the thread you referred me to and pasted it in place of the existing if statement on the tpl_main_page.php. Should I have kept that one and just added the extra code as follows?

    if ($current_page_base == 'index_home' and $cPath == '') {
    $flag_disable_left = true;
    }

    When I tried to add code like that before (not the same code but one that worked for me earlier) I got a parce error.

    Vood

  6. #6
    Join Date
    Sep 2007
    Posts
    60
    Plugin Contributions
    0

    Default Re: Exclude sideboxes from home page only?

    Here is the code as I have it now. There is no effect on the display of the home page.

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }
    if ($current_page_base == 'index_home' and $cPath == '') {
    $flag_disable_left = true;
    }

    Thanks for any help.

    Vood

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Exclude sideboxes from home page only?

    Quote Originally Posted by Vood View Post
    if ($this_is_home_page) {
    $flag_disable_left = true;
    This is the right approach to solving the problem that you have stated, but you will get errors, because there's a "}" missing from the end, and it will disable your left column, not your right column.

    Quote Originally Posted by Vood View Post
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }
    This won't do anything as there are no pages listed in the array for it to work on.

    Quote Originally Posted by Vood View Post
    if ($current_page_base == 'index_home' and $cPath == '') {
    $flag_disable_left = true;
    }
    This is syntactically correct, but still addresses the left column rather than the right and your first example would be an easier and clearer approach.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    Sep 2007
    Posts
    60
    Plugin Contributions
    0

    Default Re: Exclude sideboxes from home page only?

    Sorry. I'm not communicating very well. Here is the actual code on the tpl_main_page.php page.

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }
    if ($current_page_base == 'index_home' and $cPath == '') {
    $flag_disable_right = true;
    }

    $header_template = 'tpl_header.php';
    $footer_template = 'tpl_footer.php';
    $left_column_file = 'column_left.php';
    $right_column_file = 'column_right.php';
    $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);

    It still doesn't do anything.

    Vood

  9. #9
    Join Date
    Sep 2007
    Posts
    60
    Plugin Contributions
    0

    Default Re: Exclude sideboxes from home page only?

    I have also tried to replace the first if statement with the second one to no avail.

    Vood

  10. #10
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Exclude sideboxes from home page only?

    Apple Zen was coded to have right sideboxes only. Maybe also coded
    so that sideboxes cannot be removed..suggest also posting your query in Apple Zen Support thread at
    http://www.zen-cart.com/forum/showth...ight=apple+zen

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. sideboxes for home page only
    By barendfaber in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 3 Nov 2010, 02:21 PM
  2. Exclude css and javascript from home page?
    By damiantaylor in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 8 Apr 2010, 07:19 PM
  3. Sideboxes gone from right side on main page only
    By icklebits in forum Basic Configuration
    Replies: 17
    Last Post: 26 Nov 2009, 03:30 PM
  4. Remove Sideboxes from home page
    By tawebworks in forum Templates, Stylesheets, Page Layout
    Replies: 20
    Last Post: 8 Apr 2008, 08:19 AM
  5. Right Sideboxes disappeared from main page only.
    By mirael in forum Basic Configuration
    Replies: 1
    Last Post: 27 Aug 2007, 08:39 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR