Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2022
    Posts
    15
    Plugin Contributions
    0

    Default Define Main Page Content Also Showing Up in Category Pages

    URL : www.NortheastTroller.com
    ZC Version 1.5.8
    PHP : 7.4.33
    Bootstrap Template


    Define main page content is also showing up in category pages.

    I looked at this old thread - https://www.zen-cart.com/showthread....category-pages but no avail.

    Help?

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: Define Main Page Content Also Showing Up in Category Pages

    Could very well be your old version of bootstrap. A look at your site's page source shows 3.1.2 with 3.5.0 being current.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,677
    Plugin Contributions
    123

    Default Re: Define Main Page Content Also Showing Up in Category Pages

    Modify your template files (tpl_index_categories.php, tpl_index_default.php) to wrap the inclusion of the define page content

    require($define_page);

    in a check to see if it's the home page:

    if ($this_is_home_page) {
    ... // code for pulling in define page
    }
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Nov 2022
    Posts
    15
    Plugin Contributions
    0

    Default Re: Define Main Page Content Also Showing Up in Category Pages

    Quote Originally Posted by swguy View Post
    Modify your template files (tpl_index_categories.php, tpl_index_default.php) to wrap the inclusion of the define page content

    require($define_page);

    in a check to see if it's the home page:

    if ($this_is_home_page) {
    ... // code for pulling in define page
    }
    Oddly, no string is found in tpl_index_categories.php , and when I add the

    if ($this_is_home_page) {
    ... // code for pulling in define page
    }

    On tpl_index_default.php it removes all content from that define area but still shows it on the category page.

    I'm so confused!

  5. #5
    Join Date
    Nov 2022
    Posts
    15
    Plugin Contributions
    0

    Default Re: Define Main Page Content Also Showing Up in Category Pages

    Figured it out. in tpl_index_categories what originally read as

    Code:
    <?php
        /**
         * require the html_define for the index/categories page
         */
      require $define_page;
    ?>
    Needed to have the addition of // before the require, to actually be:

    Code:
    <?php
        /**
         * require the html_define for the index/categories page
         */
     //   require $define_page;
    ?>
    Now, the define shows up on the main page, where it should be. And not in the categories.

 

 

Similar Threads

  1. Main page content showing on category pages
    By SethF in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 2 Dec 2011, 01:26 PM
  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. Main page content showing on Category->Subcategory
    By AndyCZ in forum Customization from the Admin
    Replies: 2
    Last Post: 19 Oct 2010, 05:06 PM
  4. Main Page Content Showing On All Pages
    By bluedotted in forum Basic Configuration
    Replies: 4
    Last Post: 4 May 2009, 03:40 PM
  5. Main page content appearing on category pages
    By robgt in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Mar 2008, 06:25 PM

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