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

Hybrid View

  1. #1

    help question Blank Sidebox as Linked Graphic Only

    Hi, I've installed the Blank Sidebox Mod v2.0 and would like to make certain sideboxes as linked graphics only and the others as standard sideboxes. I've search the forums on how how to make these changes and can't seem to find an answer.

    I've hard coded some of the graphics I wanted on the sidebar into the main page template. However, this makes the graphics show up on every page. You can see what I mean on my site at: http://www.benchmarkdesign.net/index.php

    From what I've read, if set these graphics up as sideboxes, then I can control the pages on which the sideboxes are to appear either via template or css.

    Can anyone offer me some instructions on how to modify the Blank Sidebox files to display linked graphics?

    Please forgive me if I've posted this question in the wrong place or if there is already an answer out there. I couldn't find it. So, if there is, please provide a link.

    Thanks!

    Ara

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Blank Sidebox as Linked Graphic Only

    If I understand the question, you can insert graphics as links into the Blank Sidebox using standard HTML (<a href ...).

  3. #3

    Default Re: Blank Sidebox as Linked Graphic Only

    Yes. However, it there's a better way to accomplish this, I'm open to suggestions. Take a look at the sidebar graphics I have on my site. When you click them, you're taken to a specific page (ie. Learn How Our System Works). Rather than hard code these into the template, I'd rather place set each grahical link into a sidebox so that I can control on which pages the graphic shows up.

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

    Default Re: Blank Sidebox as Linked Graphic Only


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

    Default Re: Blank Sidebox as Linked Graphic Only

    Whether sideboxes or just hardcoded links, the process of controlling the pages where they display is similar.

    You can use a page test wrapping the code for processing the output, such as

    if ($current_page_base != 'pagename') {
    code to be hidden on pagename;
    }

    Or you can hide the output of an element which has a class/id tag for a certain page by prefixing #pagenameBody to the rule in the stylesheet:

    #pagenameBody .linkGraphic1 {
    display: none;
    }

  6. #6

    Default Re: Blank Sidebox as Linked Graphic Only

    Can I have multiple logo sideboxes? This is the reason why I chose the Blank Sidebox module, as I can create multiple instances.

    Regarding gjh42's comments, so if my code in the template file is:

    Code:
    <a href="index.php?main_page=page&id=20"><img src="/images/imagename.png" alt="Image Description" width="200" height="50" hspace="5" vspace="5" border="0"></a>
    and I don't want the image to appear on the page visited (since they're already there), what do I do?

  7. #7
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Blank Sidebox as Linked Graphic Only

    Quote Originally Posted by charagg View Post
    Can I have multiple logo sideboxes? This is the reason why I chose the Blank Sidebox module, as I can create multiple instances.

    Regarding gjh42's comments, so if my code in the template file is:

    Code:
    <a href="index.php?main_page=page&id=20"><img src="/images/imagename.png" alt="Image Description" width="200" height="50" hspace="5" vspace="5" border="0"></a>
    and I don't want the image to appear on the page visited (since they're already there), what do I do?
    Yes, You can have multiple logo sideboxes.
    or
    you can use just one logo sidebox and have multiple images that show up only on pages you wish.

    The last option would be controlled by the technique indicated by gjh42 in his post above.

  8. #8

    Default Re: Blank Sidebox as Linked Graphic Only

    thanks! It worked like a charm!
    Posted via Mobile Device

  9. #9

    Default Re: Blank Sidebox as Linked Graphic Only

    Good mornign Glen,

    You were a huge help last night on the Smart Backgrounds (post thread: http://www.zen-cart.com/forum/showth...=83034&page=24)

    I still need help with this one. I actually had not setup the Smart Backgrounds Add-On when I was working on this. I setup my graphics each as logo sideboxes. Unfortunately, they seem to be showing up with the default sidebox style - you can see this for the three graphics under the search box on the right at my site.

    I inserted your code from the Smart Backgrounds add-on (oops just realized I forgot to make the EZpages sytax correction you figured out last night) in to the right column on tpl_main_page as follows:

    Code:
    /**
      * prepares and displays right column sideboxes
      *
      */
    ?>
            <div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>">
    		<!--Smart Backgrounds  - Sidebox Graphics -->
    <?php $smart_image = '';
    if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to filename only if individual cat image exists, else add _ and top cat id to bg filename only if top cat image exists
      $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif')?'_' . $_GET[cPath]:file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'';
    } elseif ($current_page_base == 'page') { //add _page and ez-page id to filename only if ez-page id image exists, else add _page to filename only if general ez-page image exists
      $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET[id]:file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'';
    } else { //add _ and page base to filename only if page image exists
      $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $current_page_base . '.gif')?'_' . $current_page_base:''; //default/home page class will be just .smartBG, and filename smartbg.gif
    }?>
    <div id/class="whatever"><?php echo  zen_image(DIR_WS_TEMPLATE_IMAGES . 'smartbg' . $smart_image . '.gif', '');?></div>
    <!--/Smart Backgrounds - Sidebox Graphics -->
    		
    		<?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div>
    I then duplicated my we_accept.gif graphic and renamed as smartbg.gif and uploaded. It works just the way I want. Except that it shows up the Search Box rather than below. I think I'd have to move this code to another file rather than the tpl_main_page to do this, but I'm not sure. Maybe you can suggest this as well.

    So how do I make the other three show up now? I want the remaining three to link to specific pages and not show up on their respectively linked pages, and possibly other pages (ie. Our Company, Careers, etc.)

    Please help, as I still haven't fully grasped the way this add-on works, but am liking the results, especially after the way it works for the header backgrounds.

    Thanks,

    Ara
    BenchmarkDesign.Net - Integrated Media Solutions

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

    Default Re: Blank Sidebox as Linked Graphic Only

    I don't think the Smart BG code is really the best way to handle this case. You want the "we accept" image all the time, right? Just inserting the <img> code in the location you show will (should) put that image at the top of the column, above the sideboxes. If you want just one of the "logo" boxes to show depending on the page, the easiest way would be to have one logo sidebox with all the images in it, and the if() test modified and extended to display the one desired for each page.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Sidebox Header Graphic Question(s)
    By Hell Guapo in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 3 Jan 2012, 12:25 AM
  2. Blank Sidebox Only On Homepage
    By Globie in forum General Questions
    Replies: 2
    Last Post: 27 Oct 2008, 06:44 AM
  3. Changing the size(length) of the Blank-Sidebox only.
    By Robbyn7 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Sep 2007, 08:17 PM
  4. Adding Graphic to Bottom of Cart Sidebox
    By jacdesigner in forum Basic Configuration
    Replies: 2
    Last Post: 17 Nov 2006, 04:01 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR