v1.5.5f
Hello Cindy - on my home page I have the news box showing twice. When I installed it I only had Featured Products activated for home page (configuration/index_listing/) and today have activated New Products - so now the News Box shows below each of them - in westminster_new/templates/tpl_index_default.php the instruction to show News Box is situated at the end of the file (see below). I moved it about into different positions but the result was the same.
Am I missing something here?,
cheers Mike
Code:
<?php
/**
* Page Template
*
* Main index page<br />
* Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br />
* Centerboxes are called as necessary
*
* @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_index_default.php 3464 2006-04-19 00:07:26Z ajeh $
* modified for Editable Centerboxes by C. Jones, Glenn Herbert 2012-10-12
*/
?>
<div class="centerColumn" id="indexDefault">
<h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>
<!-- deprecated - to use uncomment this section
<?php if (TEXT_MAIN) { ?>
<div id="" class="content"><?php echo TEXT_MAIN; ?></div>
<?php } ?>-->
<!-- deprecated - to use uncomment this section
<?php if (TEXT_INFORMATION) { ?>
<div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
<?php } ?>-->
<?php
$box_loc = '1';//middlebox group
require($template->get_template_dir('tpl_middleboxes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_middleboxes.php');
?>
<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
<?php
/**
* get the Define Main Page Text
*/
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php } ?>
<?php
$box_loc = '2';//middlebox group
require($template->get_template_dir('tpl_middleboxes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_middleboxes.php');
?>
<?php
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
while (!$show_display_category->EOF) {
?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?>
<?php
/**
* display the Featured Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
/**
* display the Special Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?>
<?php
/**
* display the New Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
<?php
/**
* display the Upcoming Products Center Box
*/
?>
<?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
<?php
$show_display_category->MoveNext();
} // !EOF
?>
<?php
$box_loc = '3';//middlebox group
require($template->get_template_dir('tpl_middleboxes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_middleboxes.php');
?>
<?php
//-bof-news_box_manager-lat9 *** 1 of 1 ***
require ($template->get_template_dir('tpl_modules_news_box_format.php', DIR_WS_TEMPLATE, $current_page_base, 'templates'). '/tpl_modules_news_box_format.php');
//-eof-news_box_manager-lat9 *** 1 of 1 ***
?>
</div>