Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2006
    Posts
    39
    Plugin Contributions
    0

    Default Display Categories On Main Page

    I'm displaying the categories on the index page
    "Categories - Always Show on Main Page - 1"

    I also have some text I want to put in the main page (some welcome info that's also good for SEO). The problem is that whatever I put in the "define_main_page.php", which gets displayed on the main page, appears before the categories, gently pushing down the categories with the fancy photos out of site.

    Is there any way to make the categories appear first on the index page, and have the text in "define_main_page.php" below it?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Display Categories On Main Page

    Quote Originally Posted by amirey View Post
    I'm displaying the categories on the index page
    "Categories - Always Show on Main Page - 1"

    I also have some text I want to put in the main page (some welcome info that's also good for SEO). The problem is that whatever I put in the "define_main_page.php", which gets displayed on the main page, appears before the categories, gently pushing down the categories with the fancy photos out of site.

    Is there any way to make the categories appear first on the index page, and have the text in "define_main_page.php" below it?
    You would need to edit the includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php file to reverse the order in which they are output.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Mar 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Display Categories On Main Page

    I copied includes/templates/default_template/templates/tpl_index_default.php into includes/templates/YOUR_TEMPLATE/templates/, and changed the order of things so the end of the file is:

    -----------------
    <?php
    $show_display_category->MoveNext();
    } // !EOF
    ?>

    <?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 } ?>

    </div>
    ---------

    It would still show the text first and the categories pictures second. There must be something I don't understand.

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Display Categories On Main Page

    Your change looks fine to me, so this is mostly likely an issue with the amended file being recognised. Have you inserted your template directory name where I wrote YOUR_TEMPLATE? If so, check that it has been spelt correctly.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Mar 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Display Categories On Main Page

    Hi Kuroi

    Thanks for the help. I think I did not explain myself fully, and therefore got a wrong answer. However, you did give me the direction to look in.

    I was switching the 'display categories on main page' option in the admin on, and wanted the categories to be displayed on top of the text in the define page.

    For all the other options (fetured products etc.), the "tpl_index_default.php' would be the one to change, but switching that option on makes zen cart ignore that file, and go for the 'tpl_index_categories.php' instead. So I had to change that file, and it worked. Everything else was the way you said.

    Thanks again,
    Cheers,
    Alex

 

 

Similar Threads

  1. split categories display on main page
    By skipjensen in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 19 Mar 2011, 05:49 AM
  2. display categories on the main page?
    By fei2010 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Jul 2010, 12:38 AM
  3. Display Categories on main page..HELP
    By Spdster in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 8 Aug 2008, 05:22 AM
  4. Display Categories on Main Page but without...
    By chadderuski in forum Customization from the Admin
    Replies: 6
    Last Post: 2 Aug 2007, 02:15 AM
  5. Description in main page where categories display
    By bangsters in forum General Questions
    Replies: 0
    Last Post: 18 Dec 2006, 02:40 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