Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1. #1
    Join Date
    Jun 2005
    Posts
    120
    Plugin Contributions
    0

    Default home page only sidebox

    hi there, does anyone know if there are any examples of a sidebox that only shows up on the home page. i know how to build a new box... but i need to know how to write the IF statement to have it only show on the home page.

    or if anyone knows how to write it that would be great.

    thanks!
    Minnie Mouse

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

    Default Re: home page only sidebox

    http://www.zen-cart.com/forum/showth...debox+override
    Another discussion at url above may help

  3. #3
    Join Date
    Jun 2005
    Posts
    120
    Plugin Contributions
    0

    Default Re: home page only sidebox

    THANKS!
    that was exactly what i needed. i did a search and couldnt find it.
    MM

  4. #4
    Join Date
    Feb 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: home page only sidebox

    I am having the same problem and read the referring thread thoroughly. what I came up with was the following:

    if ($_GET['main_page'] == 'index') {
    $show_blank_sidebox = true;
    } else {
    $show_blank_sidebox = false;
    }


    Which works, however... I Only want this to show on the very very first page. As it stands now, if I click a product category the main page would then look like "index&cPath=2" so the box still shows.

    Is there so code to add that makes the index "absolute" or is that even possible. And apologies in advance for replying to such an old post but I wasnt able to find anything else pertaining to this.

    Thanks in advance!

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: home page only sidebox

    Perhaps the variable:
    $this_is_home_page

    Code:
    if ($this_is_home_page) {
    // do something because I am
    } else {
    // do something else because I ain't
    }
    would be of help to you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Feb 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: home page only sidebox

    Quote Originally Posted by Ajeh View Post
    Perhaps the variable:
    $this_is_home_page
    Unfortunetely that didnt work at all. Im a php noob so I wasnt sure what you meant exactly but I tried the below iterations all of which completely disabled the sidebox.


    Code:
    if ($http://www.nativeamericancreations.com) {
    
    if ($http://nativeamericancreations.com) {
    
    if ($nativeamericancreations.com) {
    
    if ($nativeamericancreations) {
    
    
      $show_blank_sidebox = true;
    } else {
      $show_blank_sidebox = false;
    }

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: home page only sidebox

    I was being literal there is a variable literally called:
    $this_is_home_page

    When on the Home page the variable:
    $this_is_home_page

    will be true ...

    When not on the Home page the variable:
    $this_is_home_page

    will be false ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Feb 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: home page only sidebox

    Lol I feel dumb now.... That worked perfectly!

    http://nativeamericancreationsandmore.com/

    Thank you so much!

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: home page only sidebox

    Thanks for the update that this worked for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Apr 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: home page only sidebox

    I have a blank sidebox(twitter) and also want it to be only seen on the home page http://www.mydfashop.com/store
    I have added $this_is_home_page to my blank_sidebox.php but it didn't work??? Do i need to remove or add anything else???
    This is what i had
    Code:
    $this_is_home_page
       
      $show_blank_sidebox = true;
      
      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);
     }
    ?>

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. 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
  2. Sidebox on home page only moved, how to move it back
    By shirtsatl in forum Basic Configuration
    Replies: 5
    Last Post: 5 Jan 2011, 05:46 PM
  3. Twitter sidebox only on home page
    By krazey in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 11 Dec 2010, 09:04 PM
  4. How to show a custom sidebox only on my home page?
    By SandraSD in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Dec 2009, 08:43 AM
  5. Specials Sidebox showing on home page only
    By divinelighting in forum General Questions
    Replies: 34
    Last Post: 13 Feb 2009, 05:40 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