Page 1 of 2 12 LastLast
Results 1 to 10 of 189

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Location
    Perth, Western Australia, Australia
    Posts
    781
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Add this to tpl_main_page.php

    $center_column_only = array('checkout');
    The Team Behind DealByEthan.com | Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. Connect with us: https://linktr.ee/dealbyethan


  2. #2
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Quote Originally Posted by dealbyethan.com View Post
    Add this to tpl_main_page.php

    $center_column_only = array('checkout');
    Thank you! *Didn't think it was going to be That easy!

  3. #3
    Join Date
    Dec 2005
    Location
    Perth, Western Australia, Australia
    Posts
    781
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    You're welcome. Glad to hear you got it working.
    The Team Behind DealByEthan.com | Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. Connect with us: https://linktr.ee/dealbyethan


  4. #4
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    This would work as well

    Code:
    	  if (in_array($current_page_base,explode(",",'login,checkout')) ) {
        $flag_disable_left = true;
      }

  5. #5
    Join Date
    Dec 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Quote Originally Posted by dealbyethan.com View Post
    Add this to tpl_main_page.php

    $center_column_only = array('checkout');
    Where in the page is this added?

  6. #6
    Join Date
    Apr 2008
    Location
    Flint, Michigan
    Posts
    687
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    I am somewhat confused with coding as I go through this thread.

    My goal is to hide certain sideboxes from the product pages. But, do not see sideboxes for them. Sideboxes to hide: newsletter, links, testimonials, and About Us.

    Which file? I think this may be code? Where should it go in file at?

    HTML Code:
    if (in_array($current_page_base, explode(',','about_cool_tech,cool_tech_values,inside_cool_tech,giving_back,think_green,tech_support,discount-coupon'))){
    //skip these pages
    } else {
    
    //...execute the code
    
    }  
    Thanks, Kim

  7. #7
    Join Date
    Apr 2008
    Location
    Flint, Michigan
    Posts
    687
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Quote Originally Posted by kburner View Post
    I am somewhat confused with coding as I go through this thread.

    My goal is to hide certain sideboxes from the product pages. But, do not see sideboxes files for them. Sideboxes to hide: newsletter, links, testimonials, and About Us.

    Which file? I think this may be code? Where should it go in file at?

    HTML Code:
    if (in_array($current_page_base, explode(',','about_cool_tech,cool_tech_values,inside_cool_tech,giving_back,think_green,tech_support,discount-coupon'))){
    //skip these pages
    } else {
    
    //...execute the code
    
    }  
    Thanks, Kim
    Anyone?

  8. #8
    Join Date
    Apr 2008
    Location
    Flint, Michigan
    Posts
    687
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    I want to hide certain sideboxes from product pages or basically keep only on main page. I went to includes/template/my temp/common/tpl_main_page. I added this code to keep only on main page for links side box, newsletter side box(subscribe), testimonials side box and About Us (ezpages).

    $main_page_only = array('testimonials-manager','subscribe','linksbox','ezpages');
    if (in_array($current_page_base,$main_page_only) ) {
    $flag_disable_right = true;
    $flag_disable_left = true;
    }

    I still can not get it to work.

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show/Hide sideboxes based on page

    If you really want those sideboxes only on the home page, use
    PHP Code:
    if (!$this_is_home_page){
      
    $flag_disable_left true;
      
    $flag_disable_right true;

    or to target just those pages
    PHP Code:
    if (in_array($current_page_baseexplode(',','testimonials-manager,subscribe,linksbox,ezpages'))){
      
    $flag_disable_left true;
      
    $flag_disable_right true;

    I know this should be equivalent to the test you posted, but I have successfully used this version many times.

  10. #10
    Join Date
    Apr 2008
    Location
    Flint, Michigan
    Posts
    687
    Plugin Contributions
    0

    Default Re: Show/Hide sideboxes based on page

    Quote Originally Posted by gjh42 View Post
    If you really want those sideboxes only on the home page, use
    PHP Code:
    if (!$this_is_home_page){
      
    $flag_disable_left true;
      
    $flag_disable_right true;

    or to target just those pages
    PHP Code:
    if (in_array($current_page_baseexplode(',','testimonials-manager,subscribe,linksbox,ezpages'))){
      
    $flag_disable_left true;
      
    $flag_disable_right true;

    I know this should be equivalent to the test you posted, but I have successfully used this version many times.
    I do not know what I am doing wrong. I put it as the top of the page in includes/template/my temp/common/tpl_main_page....I will work on it some more..

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Any way to show/hide payment modules dynamically based on order total?
    By Limitless in forum Addon Payment Modules
    Replies: 2
    Last Post: 27 Sep 2012, 03:22 PM
  2. Show/Hide INformation Sidebox based on page
    By atracksler in forum Basic Configuration
    Replies: 12
    Last Post: 17 Jun 2011, 04:21 PM
  3. Show/Hide sideboxes based on page
    By monkeyjr47906 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 29 Nov 2007, 07:25 PM
  4. Hide sideboxes on main page
    By disciple in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 11 Jan 2007, 07:38 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