New Zenner
- Join Date:
- Mar 2007
- Posts:
- 26
- Plugin Contributions:
- 0
Code displays in the header of my webpage
I followed the steps in FAQ to create a new Custom Template, https://www.zen-cart.com/tutorials/index.php?article=142. It worked okay but now I have some code in my header section starting with " // Display all header alerts via messageStack:"
Below is the code from template_info.php where this is coming from. Can someone tell me why this code is displayed on my website? Unfortunately, I saved the changes in the /template_default directory by mistake before I saved again to /custom.
<?php /** * Common Template - tpl_header.php * * this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * make a directory /templates/my_template/privacy<br /> * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br /> * to override the global settings and turn off the footer un-comment the following line:<br /> * <br /> * $flag_disable_header = true;<br /> * * @package templateSystem * @copyright Copyright 2003-2006 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: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $ */ ?> <?php $template_name = 'CUSTOM';$template_version = 'Version 1.0';$template_author = Thunbug';$template_description = 'This is my own template, created for my site at [www.xxxxx.com/shop';$template\_screenshot](http://www.xxxxx.com/shop';$template_screenshot) = '';?>// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {
}
?>