Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2007
    Location
    West Texas
    Posts
    128
    Plugin Contributions
    1

    Default I need to have a particular sidebox only show on one EZ page.

    I need to have a particular sidebox only show on one EZ page.

    main_page=page&id=25&chapter=0

    This is what I came up with by searching the forum, but when I use this code I get a parse error.
    Could someone tell me where I've gone wrong?

    Here's the current code for the includes/modules/sideboxes/mytemplate/partyplanning_links.php that I have.

    Code:
    if ($request_type == 'NONSSL')
    if (in_array($current_page_base,explode(",",'main_page=page&id=25&chapter=0')) ) {
         $show_partyplanning_sidebox = true;
      } else {
        $show_partyplanning_sidebox = false;
      }
      
      if ($show_partyplanning_sidebox == true) {
    MAIN BLOCK
    }  
    
    {
    
        require($template->get_template_dir('tpl_partyplanning_links.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_partyplanning_links.php');
    
        $title = BOX_HEADING_PARTYPLANNING_LINKS;
        $left_corner = false;
        $right_corner = false;
        $right_arrow = false;
        $title_link = false;
    
        require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    
      }
    
    ?>

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

    Default Re: I need to have a particular sidebox only show on one EZ page.

    You might peek in the Downloads for the TOC sidebox for EZ-Pages ...

    This only shows when you are using the Chapters on an EZ-Page rather than show the TOC in the middle of the page ...

    See if that can get you started on this or if that is all you are needing ...
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Feb 2007
    Location
    West Texas
    Posts
    128
    Plugin Contributions
    1

    Default Re: I need to have a particular sidebox only show on one EZ page.

    I'm not at all familiar with TOC. Wouldn't that mod let the sidebox show on every EZ page that I have that is =0 (chapter)?? I have about 30 EZ pages with the =0.

    I really just need the "if" statement that will only allow ONE particular sidebox to show on ONE particular EZ page. This is my first try at EZ pages and it automatically put the =0 on there.

    Hoping you can help me with the "if" statement, in the meantime I'll keep searching for the answer.

    many thanks for your help and suggestion.

  4. #4
    Join Date
    Feb 2007
    Location
    West Texas
    Posts
    128
    Plugin Contributions
    1

    Default Re: I need to have a particular sidebox only show on one EZ page.

    Parse error is this:

    Parse error: syntax error, unexpected T_STRING in /home2/shabecom/public_html/includes/modules/sideboxes/Custom1/partyplanning_links.php on line 21

    code is this:

    Code:
    <?php
    /**
     * absolute links sidebox - displays sidebox with absolute links on all pages EXCEPT SSL pages
     *
     * @package templateSystem
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: absolute_links.php 2007-07-09 06:06:06Z  tolefairy $
     *
     * Displays on non ssl pages only-to avoid secure/non-secure warning
     */
    
    if (in_array($current_page_base,explode(",",'main_page=page&id=25&chapter=0')) ) {
         $show_partyplanning_sidebox = true;
      } else {
        $show_partyplanning_sidebox = false;
      }
      
      if ($show_partyplanning_sidebox == true) {
    MAIN BLOCK
    } 
     
    {
    
        require($template->get_template_dir('tpl_partyplanning_links.php',DIR_WS_TEMPLATE, 
    
    $current_page_base,'sideboxes'). '/tpl_partyplanning_links.php');
    
        $title = BOX_HEADING_PARTYPLANNING_LINKS;
        $left_corner = false;
        $right_corner = false;
        $right_arrow = false;
        $title_link = false;
    
        require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, 
    
    $current_page_base,'common') . '/' . $column_box_default);
    
      }
    
    ?>
    I'm not using TOC. Just EZ pages.

  5. #5
    Join Date
    Feb 2007
    Location
    West Texas
    Posts
    128
    Plugin Contributions
    1

    Default Re: I need to have a particular sidebox only show on one EZ page.

    on second thought, I think I'm mixing two problems here. Forgive me.

    I'll be back to let you know if I was successful with the Blank Sidebox mod.

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

    Default Re: I need to have a particular sidebox only show on one EZ page.

    The $current_page_base is 'page' ...

    PHP Code:
    if ($current_page_base== 'page' and $_GET['id']==25 and $_GET['chapter']==) { 
    Should identify you are on that page ...
    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: v1.5.5]
    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!

  7. #7
    Join Date
    Feb 2007
    Location
    West Texas
    Posts
    128
    Plugin Contributions
    1

    Default Re: I need to have a particular sidebox only show on one EZ page.

    after two days of trying this-that-and whatever code, trying blank and editable sideboxes, searching til I'm blind and butting my head against the wall, I have come to the conclusion that it cannot be done in zen cart.

    if anyone ever finds a way, and is willing to provide the code, the complete code, not just snippets and bits and pieces, to have a sidebox show ONLY on One particular ez page I'm all ears. I am so inexperienced it does me no good for someone to give me a line of code and not clarify exactly where to apply it. I am dumber than dirt about php.

    In the meantime, I'm going to build what I need in html. At least I know what I'm doing with that. What I need on my ez pages does not involve the database, so its not a big deal. I would just rather have found a way to do it in zen cart.

    Thank you very much for trying to help. But I think I am hopeless in my quest.

  8. #8
    Join Date
    Feb 2007
    Location
    West Texas
    Posts
    128
    Plugin Contributions
    1

    Default Re: I need to have a particular sidebox only show on one EZ page.

    It can be done after all, and Ajeh gave me the clue, of course. (thank you, I couldn't have done it without you). It's just very hard to put the clue with the right code when you don't know what you're doing or even where to find it. Zen Cart is not for the faint of heart. After all, it only took me 2 and a half days to get the result. GEEZ!

    And for anyone that wants to know how to have a sidebox display on only one ez page its in the modules/sideboxes/Your_Template/???_sidebox.php

    ??? = whatever you name your sidebox

    I used the blank_sidebox mod and gave it the name of partyplanning_sidebox. Mine works on only one particular EZ page and does not show on any other pages on my site. Just like I wanted......finally.

    If anyone is wondering why I want a particular sidebox to show on only one page, its because I want the ad that goes in that box to relate to that page only. This way I can duplicate the sidebox, giving each a different name and put relevant ads on relevant pages.

    Heres the code that worked for me although Its late and won't be showing until tomorrow. I'm getting some shuteye and will start fresh tomorrow.

    Code:
    // test if box should display
      if ($current_page_base== 'page' and $_GET['id']==25 and $_GET['chapter']==0 ) {  
         $show_partyplanning_sidebox = true;
      } else {
        $show_partyplanning_sidebox = false;
      }
    
      if ($show_partyplanning_sidebox == true) {
          require($template->get_template_dir('tpl_partyplanning_sidebox.php',DIR_WS_TEMPLATE, 
    
    $current_page_base,'sideboxes'). '/tpl_partyplanning_sidebox.php');
          $title =  BOX_HEADING_PARTYPLANNING_SIDEBOX;
          $title_link = false;
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, 
    
    $current_page_base,'common') . '/' . $column_box_default);
     }
    ?>
    cheers!

 

 

Similar Threads

  1. v139h Need to only show in one category
    By 4jDesigns in forum General Questions
    Replies: 1
    Last Post: 30 May 2012, 12:40 PM
  2. Need SideBox to show in One Catagory Only
    By ljdream00 in forum Basic Configuration
    Replies: 31
    Last Post: 16 Mar 2009, 07:30 PM
  3. I need to have a particular sidebox only show on one EZ page.
    By tolefairy in forum General Questions
    Replies: 0
    Last Post: 20 Jan 2008, 07:20 AM
  4. Disable a particular sidebox for a particular page?
    By surabisantosh in forum Basic Configuration
    Replies: 1
    Last Post: 22 Nov 2007, 08:04 PM
  5. I only have one product-Can I have it show up on the index?
    By schwimwastaken in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 30 Aug 2006, 04:03 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