Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Posts
    40
    Plugin Contributions
    0

    Default Main page displaying text from define editor on every category page

    Hi Guys,
    I really need some help with the following
    my website url - www.group101.co.uk
    On the home page you will notice I have a large text area then I have the Show categories on main page selected from admin,
    Directly below these boxes I the words "Call us for quotes and pricing" this is edited from define pages and is called - define_main_page_lower.php
    I followed someone tuturiol on how to make an additionl text box.
    Here is what I'm trying to acheive. I want to split the large intro text in two I want to use half the text in define pages editors (define_main_page) , I then want the cateogory to display (Images as they do) , directly below this I was a second text area which is currently call (- define_main_page_lower.php )
    Ive got the layout looking how it should but the only issue now is the new "define_main_page_lower.php) "Call us for quotes and pricing" actually shows on all category pages. See example - http://www.group101.co.uk/banner-printing#.U6dqFI1dUl4
    The new page (define_main_page-lower.php) should only be seen on the phone page.
    Please see my two files that I've been changing to get the layout right so far. ....Perhaps some one can spot a mistake in the code and this is a fairly eay fix.
    tpl_index_default.php
    <?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 $
    */
    ?>
    <div class=&quot;centerColumn&quot; id=&quot;indexDefault&quot;>

    <!-- begin edit for ZX Slideshow -->
    <?php if(ZX_SLIDESHOW_STATUS == &#39;true&#39;) { ?>
    <?php require($template->get_template_dir(&#39;zx_slideshow.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/zx_slideshow.php&#39;); ?>
    <?php } ?>
    <!-- end edit for ZX Slideshow -->

    <h1 id=&quot;indexDefaultHeading&quot;><?php echo HEADING_TITLE; ?></h1>

    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
    <h2 class=&quot;greeting&quot;><?php echo zen_customer_greeting(); ?></h2>
    <?php } ?>

    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_MAIN) { ?>
    <div id=&quot;&quot; class=&quot;content&quot;><?php echo TEXT_MAIN; ?></div>
    <?php } ?>-->

    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_INFORMATION) { ?>
    <div id=&quot;&quot; class=&quot;content&quot;><?php echo TEXT_INFORMATION; ?></div>
    <?php } ?>-->

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the Featured Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_featured_products.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_featured_products.php&#39;); ?>
    <?php } ?>

    <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
    <?php

    /**
    * get the Define Main Page Text
    */
    ?>
    <div id=&quot;indexDefaultMainContent&quot; class=&quot;content&quot;><?php require($define_page); ?></div>
    <?php } ?>

    <?php
    $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
    while (!$show_display_category->EOF) {
    ?>

    <!-- begin categories center box module -->
    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_CATEGORIES&#39;) { ?>
    <?php
    /**
    * display the Categories Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_categories_center_box.php&#39;,DIR_WS_TEMPLAT E, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_categories_center_box.php&#39;); ?>
    <?php } ?>
    <!-- end categories center box module -->

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the Special Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_specials_default.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_specials_default.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_whats_new.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_whats_new.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_UPCOMING&#39;) { ?>
    <?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
    ?>
    </div>


    Second file I&#39;ve been playing around with is - tpl_index_default.php


    <?php
    /**
    * Page Template
    *
    * Loaded by main_page=index<br />
    * Displays category/sub-category listing<br />
    * Uses tpl_index_category_row.php to render individual items
    *
    * @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_categories.php 4678 2006-10-05 21:02:50Z ajeh $
    */
    ?>
    <div class=&quot;centerColumn&quot; id=&quot;indexCategories&quot;>

    <!-- begin edit for ZX Slideshow -->
    <?php
    if($this_is_home_page) {
    if (ZX_SLIDESHOW) { ?>
    <?php require($template->get_template_dir(&#39;zx_slideshow.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/zx_slideshow.php&#39;); ?>
    <?php }
    }?>
    <!-- end edit for ZX Slideshow -->

    <?php if ($show_welcome == true) { ?>
    <h1 id=&quot;indexCategoriesHeading&quot;><?php echo HEADING_TITLE; ?></h1>

    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
    <h2 class=&quot;greeting&quot;><?php echo zen_customer_greeting(); ?></h2>
    <?php } ?>

    <!-- deprecated - to use - uncomment
    <?php if (TEXT_MAIN) { ?>
    <div id=&quot;&quot; class=&quot;content&quot;><?php echo TEXT_MAIN; ?></div>
    <?php } ?>-->

    <!-- deprecated - to use - uncomment
    <?php if (TEXT_INFORMATION) { ?>
    <div id=&quot;&quot; class=&quot;content&quot;><?php echo TEXT_INFORMATION; ?></div>
    <?php } ?>-->

    <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
    <div id=&quot;indexCategoriesMainContent&quot; class=&quot;content&quot;><?php
    /**
    * require the html_define for the index/categories page
    */
    include($define_page);
    ?></div>
    <?php } ?>

    <?php } else { ?>
    <h1 id=&quot;indexCategoriesHeading&quot;><?php echo $breadcrumb->last(); ?></h1>
    <?php } ?>

    <?php
    // categories_description
    if ($current_categories_description != &#39;&#39;) {
    ?>
    <div id=&quot;categoryDescription&quot; class=&quot;catDescContent&quot;><?php echo $current_categories_description; ?></div>
    <?php } // categories_description ?>
    <!-- BOF: Display grid of available sub-categories, if any -->
    <?php
    if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
    // do nothing
    } else {
    // display subcategories
    /**
    * require the code to display the sub-categories-grid, if any exist
    */
    require($template->get_template_dir(&#39;tpl_modules_category_row.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_category_row.php&#39;);
    }
    ?>
    <!-- EOF: Display grid of available sub-categories -->

    <?php
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == &#39;true&#39;) {
    // categories_image
    if ($categories_image = zen_get_categories_image($current_category_id)) {
    ?>
    <div id=&quot;categoryImgListing&quot; class=&quot;categoryImg&quot;><?php echo zen_image(DIR_WS_IMAGES . $categories_image, &#39;&#39;, SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>
    <?php
    }
    } // categories_image
    ?>

    <?php
    $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_CATEGORY);

    while (!$show_display_category->EOF) {
    // // echo &#39;I found &#39; . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS);

    ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_CATEGORY_FEATURED_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the Featured Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_featured_products.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_featured_products.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_CATEGORY_SPECIALS_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the Special Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_specials_default.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_specials_default.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_CATEGORY_NEW_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_whats_new.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_whats_new.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_CATEGORY_UPCOMING&#39;) { ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
    <?php
    $show_display_category->MoveNext();
    } // !EOF
    ?>
    <div>
    <div id=&quot;indexDefaultLowerContent&quot; class=&quot;content&quot;><?php require($define_main_page_lower); ?></div>
    </div>

    I would really appreciate it if someone could have a look at this and come back to...
    I&#39;ve tried adding the following text in various places on the above files to try and get this going
    <div>
    <div id=&quot;indexDefaultLowerContent&quot; class=&quot;content&quot;><?php require($define_main_page_lower); ?></div>

    I hope the above makes sense....

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Main page displaying text from define editor on every category page

    Quote Originally Posted by Canvas101 View Post
    Hi Guys,
    I really need some help with the following
    my website url - www.group101.co.uk
    On the home page you will notice I have a large text area then I have the Show categories on main page selected from admin,
    Directly below these boxes I the words &quot;Call us for quotes and pricing&quot; this is edited from define pages and is called - define_main_page_lower.php
    I followed someone tuturiol on how to make an additionl text box.
    Here is what I&#39;m trying to acheive. I want to split the large intro text in two I want to use half the text in define pages editors (define_main_page) , I then want the cateogory to display (Images as they do) , directly below this I was a second text area which is currently call (- define_main_page_lower.php )
    Ive got the layout looking how it should but the only issue now is the new &quot;define_main_page_lower.php) &quot;Call us for quotes and pricing&quot; actually shows on all category pages. See example - http://www.group101.co.uk/banner-printing#.U6dqFI1dUl4
    The new page (define_main_page-lower.php) should only be seen on the phone page.
    Please see my two files that I&#39;ve been changing to get the layout right so far. ....Perhaps some one can spot a mistake in the code and this is a fairly eay fix.
    tpl_index_default.php
    <?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 $
    */
    ?>
    <div class=&quot;centerColumn&quot; id=&quot;indexDefault&quot;>

    <!-- begin edit for ZX Slideshow -->
    <?php if(ZX_SLIDESHOW_STATUS == &#39;true&#39;) { ?>
    <?php require($template->get_template_dir(&#39;zx_slideshow.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/zx_slideshow.php&#39;); ?>
    <?php } ?>
    <!-- end edit for ZX Slideshow -->

    <h1 id=&quot;indexDefaultHeading&quot;><?php echo HEADING_TITLE; ?></h1>

    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
    <h2 class=&quot;greeting&quot;><?php echo zen_customer_greeting(); ?></h2>
    <?php } ?>

    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_MAIN) { ?>
    <div id=&quot;&quot; class=&quot;content&quot;><?php echo TEXT_MAIN; ?></div>
    <?php } ?>-->

    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_INFORMATION) { ?>
    <div id=&quot;&quot; class=&quot;content&quot;><?php echo TEXT_INFORMATION; ?></div>
    <?php } ?>-->

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the Featured Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_featured_products.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_featured_products.php&#39;); ?>
    <?php } ?>

    <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
    <?php

    /**
    * get the Define Main Page Text
    */
    ?>
    <div id=&quot;indexDefaultMainContent&quot; class=&quot;content&quot;><?php require($define_page); ?></div>
    <?php } ?>

    <?php
    $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
    while (!$show_display_category->EOF) {
    ?>

    <!-- begin categories center box module -->
    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_CATEGORIES&#39;) { ?>
    <?php
    /**
    * display the Categories Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_categories_center_box.php&#39;,DIR_WS_TEMPLAT E, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_categories_center_box.php&#39;); ?>
    <?php } ?>
    <!-- end categories center box module -->

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the Special Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_specials_default.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_specials_default.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_whats_new.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_whats_new.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_MAIN_UPCOMING&#39;) { ?>
    <?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
    ?>
    </div>


    Second file I&#39;ve been playing around with is - tpl_index_default.php


    <?php
    /**
    * Page Template
    *
    * Loaded by main_page=index<br />
    * Displays category/sub-category listing<br />
    * Uses tpl_index_category_row.php to render individual items
    *
    * @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_categories.php 4678 2006-10-05 21:02:50Z ajeh $
    */
    ?>
    <div class=&quot;centerColumn&quot; id=&quot;indexCategories&quot;>

    <!-- begin edit for ZX Slideshow -->
    <?php
    if($this_is_home_page) {
    if (ZX_SLIDESHOW) { ?>
    <?php require($template->get_template_dir(&#39;zx_slideshow.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/zx_slideshow.php&#39;); ?>
    <?php }
    }?>
    <!-- end edit for ZX Slideshow -->

    <?php if ($show_welcome == true) { ?>
    <h1 id=&quot;indexCategoriesHeading&quot;><?php echo HEADING_TITLE; ?></h1>

    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
    <h2 class=&quot;greeting&quot;><?php echo zen_customer_greeting(); ?></h2>
    <?php } ?>

    <!-- deprecated - to use - uncomment
    <?php if (TEXT_MAIN) { ?>
    <div id=&quot;&quot; class=&quot;content&quot;><?php echo TEXT_MAIN; ?></div>
    <?php } ?>-->

    <!-- deprecated - to use - uncomment
    <?php if (TEXT_INFORMATION) { ?>
    <div id=&quot;&quot; class=&quot;content&quot;><?php echo TEXT_INFORMATION; ?></div>
    <?php } ?>-->

    <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
    <div id=&quot;indexCategoriesMainContent&quot; class=&quot;content&quot;><?php
    /**
    * require the html_define for the index/categories page
    */
    include($define_page);
    ?></div>
    <?php } ?>

    <?php } else { ?>
    <h1 id=&quot;indexCategoriesHeading&quot;><?php echo $breadcrumb->last(); ?></h1>
    <?php } ?>

    <?php
    // categories_description
    if ($current_categories_description != &#39;&#39;) {
    ?>
    <div id=&quot;categoryDescription&quot; class=&quot;catDescContent&quot;><?php echo $current_categories_description; ?></div>
    <?php } // categories_description ?>
    <!-- BOF: Display grid of available sub-categories, if any -->
    <?php
    if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
    // do nothing
    } else {
    // display subcategories
    /**
    * require the code to display the sub-categories-grid, if any exist
    */
    require($template->get_template_dir(&#39;tpl_modules_category_row.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_category_row.php&#39;);
    }
    ?>
    <!-- EOF: Display grid of available sub-categories -->

    <?php
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == &#39;true&#39;) {
    // categories_image
    if ($categories_image = zen_get_categories_image($current_category_id)) {
    ?>
    <div id=&quot;categoryImgListing&quot; class=&quot;categoryImg&quot;><?php echo zen_image(DIR_WS_IMAGES . $categories_image, &#39;&#39;, SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>
    <?php
    }
    } // categories_image
    ?>

    <?php
    $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_CATEGORY);

    while (!$show_display_category->EOF) {
    // // echo &#39;I found &#39; . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS);

    ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_CATEGORY_FEATURED_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the Featured Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_featured_products.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_featured_products.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_CATEGORY_SPECIALS_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the Special Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_specials_default.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_specials_default.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_CATEGORY_NEW_PRODUCTS&#39;) { ?>
    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir(&#39;tpl_modules_whats_new.php&#39;,DIR_WS_TEMPLATE, $current_page_base,&#39;templates&#39;). &#39;/tpl_modules_whats_new.php&#39;); ?>
    <?php } ?>

    <?php if ($show_display_category->fields[&#39;configuration_key&#39;] == &#39;SHOW_PRODUCT_INFO_CATEGORY_UPCOMING&#39;) { ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
    <?php
    $show_display_category->MoveNext();
    } // !EOF
    ?>
    <div>
    <div id=&quot;indexDefaultLowerContent&quot; class=&quot;content&quot;><?php require($define_main_page_lower); ?></div>
    </div>

    I would really appreciate it if someone could have a look at this and come back to...
    I&#39;ve tried adding the following text in various places on the above files to try and get this going
    <div>
    <div id=&quot;indexDefaultLowerContent&quot; class=&quot;content&quot;><?php require($define_main_page_lower); ?></div>

    I hope the above makes sense....
    If understood correctly, you only want this new divided text to appear on the main page. Would want to enclose that call between this:

    Code:
    if($this_is_home_page) { 
    
    /* add your second page/continuation outside of this comment block */
    
    }
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Main page displaying text from define editor on every category page

    Quote Originally Posted by mc12345678 View Post
    If understood correctly, you only want this new divided text to appear on the main page. Would want to enclose that call between this:

    Code:
    if($this_is_home_page) { 
    
    /* add your second page/continuation outside of this comment block */
    
    }
    But then again, that it is supposed to only be on the phone page, so what I suggested above won't work. Would need to check to see what page you are on and if it is the phone page, then to activate/display. Sorry that at the moment I don't recall the specific variable on which to compare/have ready access to look it up. :/
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Apr 2007
    Posts
    40
    Plugin Contributions
    0

    Default Re: Main page displaying text from define editor on every category page

    Thanks for your reply.

    The text on the homepage is controlled by define pages editor

    The top half is created using define_mainpage then you have the icons and images which are enabled from configuration show categories on main page from configuration. You're the have the lower text underneath the product categories which reads " call us for quotes and pricing" the layout of the page is correct it's exactly what I'm trying to achieve.

    This I have is the part where is reads " call us for quotes and pricing" also shows at the bottom of each category page. So if you see the following page

    http://www.group101.co.uk/print-fini...1#.U6e0CH-9KSM

    you will see right at the bottom of this page it shows the "call us for quotes and pricing " it displays this on all category pages. Just trying to get rid of it from those category pages but to remain on all others.

    any ideas guys?

  5. #5
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Main page displaying text from define editor on every category page

    Quote Originally Posted by Canvas101 View Post
    Thanks for your reply.

    The text on the homepage is controlled by define pages editor

    The top half is created using define_mainpage then you have the icons and images which are enabled from configuration show categories on main page from configuration. You're the have the lower text underneath the product categories which reads " call us for quotes and pricing" the layout of the page is correct it's exactly what I'm trying to achieve.

    This I have is the part where is reads " call us for quotes and pricing" also shows at the bottom of each category page. So if you see the following page

    http://www.group101.co.uk/print-fini...1#.U6e0CH-9KSM

    you will see right at the bottom of this page it shows the "call us for quotes and pricing " it displays this on all category pages. Just trying to get rid of it from those category pages but to remain on all others.

    any ideas guys?
    Well there were two thoughts that came to mind to me... Either add additional code in the tpl_index_default.php file to only have the new define page show on the main page (posted that solution earlier) or to use CSS and the various stylesheet options to display/hide the text as appropriate. This later version makes things far more modifiable so that in the future perhaps you want that text to appear on more than just the main page you can load applicable CSS for the category, product, or whatever page type is to be displayed. If more code is added then that's one or more lines to transfer over/validate upon upgrade, whereas the css, well for the most part will hopefully just carry over. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Cannot edit main page from Tools/Define page editor
    By bearlymakinit in forum Customization from the Admin
    Replies: 2
    Last Post: 9 Apr 2015, 02:15 AM
  2. define main page text repeated in category pages
    By dealbyethan.com in forum General Questions
    Replies: 17
    Last Post: 25 Oct 2010, 02:22 PM
  3. Can't Edit Define Main Page in Define Page Editor
    By robynannw in forum General Questions
    Replies: 2
    Last Post: 8 May 2010, 05:15 PM
  4. Replies: 14
    Last Post: 29 Sep 2007, 03:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR