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
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 ...).
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.
Re: Blank Sidebox as Linked Graphic Only
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;
}
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?
Re: Blank Sidebox as Linked Graphic Only
Quote:
Originally Posted by
charagg
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.
Re: Blank Sidebox as Linked Graphic Only
main_page=page&id=20
If you want to control display on specific ez-pages, you might do best to install the Smart Backgrounds mod. It will give a page body class that indicates the current ez-page (among other features); you can then use this class as a prefix for a rule in your stylesheet to set display: none; on that graphic on that ez-page. Something like
.smartBG_p20 .linkGraphic1 {display: none;}
You would need to make a dummy image file named according to the specific ez-page in order to get the class tag. Alternatively, the Smart BG code could be tweaked to ignore image file checking and just set the class tag in all cases.
Another option, if you want to control this in the PHP code, is to use a test like
PHP Code:
if ($current_page_base != 'page' or $_GET['id'] != 20) {
<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>
}
Re: Blank Sidebox as Linked Graphic Only
Thanks for the help - I will have to try some of these options and revisit this forum. gjh42's instructions are a little technical, but will most likely make more sense to me when I start working on this. Have to go... may not be able to revisit this until this weekend. Hopefully... sooner. Thanks again for all the advise. I'll give it a try and post my results here.:smile:
Re: Blank Sidebox as Linked Graphic Only
OK my friends... I'm back. So, I ended up installing the Logo Sidebox add-on and created an instance of this add-on for each graphic. So, how do I control the pages on which these are to appear. For instance, I don't want the same graphic on the page to which it is linked. Most are linked to EZpages, but I may want one on a cart page or contact us page, or privacy page, etc. I didn't quite understand the suggestions by gjh42... any suggestions?