To add a new side box you have to add code to three place.
- to your includes\languages\english\extra_definitions to define the code as your going to add a new side box
- To your includes\modules\sideboxes . here add the side box
- And last is \includes\templates\template_default\sideboxes. here contain of the side box are add.
now code for a blank side box is added named “blank_sidebox_defines.php”
<?php
/**
* blank sidebox definitions - text for inclusion in a new blank sidebox
*
* @package templateSystem
* @copyright 2007 Kuroi Web Design
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: blank_sidebox.php 2007-05-26 kuroi $
*/
define('BOX_HEADING_BLANK_SIDEBOX', 'Blank Sidebox Header');
define('TEXT_BLANK_SIDEBOX', 'Replace this text with your HTML content.');
?>
No:2…. named”blank_sidebox.php”
<?php
/**
* blank sidebox - allows a blank sidebox to be added to your site
*
* @package templateSystem
* @copyright 2007 Kuroi Web Design
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: blank_sidebox.php 2007-05-26 kuroi $
*/
// test if box should display
$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);
}
?>
And last no.::3 named “tpl_blank_sidebox.php”
<?php
/**
* blank sidebox - allows a blank sidebox to be added to your site
*
* @package templateSystem
* @copyright 2007 Kuroi Web Design
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: blank_sidebox.php 2007-05-26 kuroi $
*/
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
// Replace the text and HTML tags between the apostophes on lines 19 and 20.
// Use as many or as few lines using this model as you need for your custom content.
// If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19.
// If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!)
$content .= '<p>' . TEXT_BLANK_SIDEBOX . '</p>';
$content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>';
$content .= '</div>';
?>
After all added go to your admin panel and login where in tools section go to layput box controller and found your newly add side box.
23.765833
90.363067
Resent Comment