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,860
    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
    Dezina ZenCart Templates
    Please do not PM for support queries..Post in forums..help others

  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
    59,764
    Blog Entries
    4
    Plugin Contributions
    133

    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!
    Donations always welcome: www.zen-cart.com/donate

    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,655
    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.
    See and test drive Zen Cart's free templates at zencarttemplates.info

    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,860
    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
    Dezina ZenCart Templates
    Please do not PM for support queries..Post in forums..help others

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to get rid of the small 'home' link at the bottom of page
    By ncd in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Jul 2007, 09:59 AM
  2. Synchronizing zen cart with home page
    By beautifulminds-us in forum General Questions
    Replies: 1
    Last Post: 20 Jul 2007, 11:03 PM
  3. seperate Home Page Layout
    By staedtler in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Jun 2007, 06:56 PM
  4. Random Products on Home Page
    By pal1lap in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Jan 2007, 11:41 PM
  5. login page as a home page
    By lealexandre in forum General Questions
    Replies: 3
    Last Post: 19 Dec 2006, 08:25 PM

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
  •