Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2003
    Posts
    70
    Plugin Contributions
    0

    Default Turn off right column in home page only

    I gather that to turn off the right column in only the Home Page I insert the following code into the file tpl_main_page.php (in an override structure):-
    if ($this_is_home_page) {
    $flag_disable_right = true;
    }
    However I am unclear exactly where in the file this should be inserted.
    Can someone please verify that I am correct, and clarify my confusion.

  2. #2
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Turn off right column in home page only

    Rather try this:

    Find the line (Around 42 / 43)

    PHP Code:
    // 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;
      } 
    ... and insert index where shown...

    PHP Code:
    // the following IF statement can be duplicated/modified as needed to set additional flags
      
    if (in_array($current_page_base,explode(",",'index')) ) {
        
    $flag_disable_right true;
      } 
    Later, if you want to, you can disable right column for more pages in this way.

  3. #3
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Turn off right column in home page only

    Suggestion above does not work for home page only... Sorry...

    Will get back to you.

  4. #4
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Turn off right column in home page only

    Just paste it under this, as shown below:-

    PHP Code:
    // 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 (
    $this_is_home_page) {
    $flag_disable_right true;


  5. #5
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Turn off right column in home page only

    Quote Originally Posted by KiwiBrian View Post
    I gather that to turn off the right column in only the Home Page I insert the following code into the file tpl_main_page.php (in an override structure):-
    if ($this_is_home_page) {
    $flag_disable_right = true;
    }
    However I am unclear exactly where in the file this should be inserted.
    Can someone please verify that I am correct, and clarify my confusion.
    Your code is correct and the file would go here:

    includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php

    If you do not already have a 'common' dir. then you can create one.

  6. #6
    Join Date
    Nov 2003
    Posts
    70
    Plugin Contributions
    0

    Default Re: Turn off right column in home page only

    Thanks to you both for the help.
    Rob, I appreciate your confirmation that the code insert is correct, but you did not answer my main query regarding exactly where in the file the snippet should be inserted.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Turn off right column in home page only

    Quote Originally Posted by KiwiBrian View Post
    Thanks to you both for the help.
    Rob, I appreciate your confirmation that the code insert is correct, but you did not answer my main query regarding exactly where in the file the snippet should be inserted.
    Same place as fairestcape was suggesting
    .

    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.

  8. #8
    Join Date
    Nov 2003
    Posts
    70
    Plugin Contributions
    0

    Default Re: Turn off right column in home page only

    Thanks DB for the clarification.

 

 

Similar Threads

  1. v154 Turn Off the right Column
    By adb34 in forum General Questions
    Replies: 13
    Last Post: 5 Apr 2015, 11:02 AM
  2. turn off left or right side bar on home page only [and only certain EZ pages]
    By thebigkick in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Jun 2012, 10:23 PM
  3. Show right column on home page only
    By Danielle in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Apr 2011, 12:13 AM
  4. Turn off right and left columns front page only
    By cshart in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 24 Dec 2010, 04:24 AM
  5. IF statement to turn off left/right column on category page
    By milkyway in forum General Questions
    Replies: 6
    Last Post: 1 Oct 2007, 08:26 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