New Zenner
- Join Date:
- Aug 2007
- Posts:
- 12
- Plugin Contributions:
- 0
custom sidebox, i.e. perhaps for SSL or trust seal
I recently had a client who wanted various items placed within the side columns of her site, but not within actual sideboxes. After initially playing around with tpl_main_page.php in the templates/MYTEMPLATE/common/ folder, I found a better way to do this.
You can actually create side panel features that can be controlled just like any other sidebox (Tools --> Layout Boxes Controller), but aren't actually displayed within a sidebox template.
This is particularly useful if you wish to display a SSL security seal or trust seal within a column on your website.
To create a custom side panel feature, create a new PHP file with the code below. Be sure to change CUSTOM_NAME with your own chosen name.
<?php
// -----------------------------------
// MY CUSTOM SIDE PANEL ITEM
// -----------------------------------
// test if box should be displayed
$show_CUSTOM_NAME = true;
if ($show_CUSTOM_NAME == true) {
?>
<div align="center" style="padding:5px;">
PLACE YOUR BOX CONTENTS HERE
</div>
<?php }
?>
Save the file as CUSTOM_NAME.php (replacing CUSTOM_NAME with your own name, providing it is consistent with the one used in the page code). Upload the file into the includes/modules/sideboxes/ folder. Then log into admin, and select Tools -> Layout Boxes Controller to manage your new feature. You can select which column to display it within, along with its sort order, just like any other module.
P.S. My apologies if this has been discussed a thousand times before.
