Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jul 2007
    Posts
    5
    Plugin Contributions
    0

    Idea or Suggestion New format for Index Page

    Hi,
    I need some help please
    I would like my Index Page to have a different Layout.


    1. Welcome Guest! Would you like to.......
    2. Some Text - This is now (define_main_page.php)
    3. New Products
    4. Some More Text
    5. Featured Products
    6. Even More Text

    I probably need more then one define_main_Page.php.

    I don't know where to start. I'd appreciate any help.
    Thank you

  2. #2
    Join Date
    Aug 2007
    Posts
    27
    Plugin Contributions
    0

    Default Re: New format for Index Page

    I think you will have to use your php skills - you could try looking at the file:

    includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php

  3. #3
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: New format for Index Page

    I havent tried it myself , so you may need some more input , but I believe you could :

    look at the file tpl_index_default.php

    find the line

    Code:
    <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
    and copy and paste it further down that page between the New and featured ( the page is well commented )

    change the require bit to <?php require($define_page2)


    then look at the file :

    includes/modules/pages/index/header_php.php


    Code:
    Line #42 : $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_MAIN_PAGE, 'false');
    and copy and paste again and change the start to the same as you called the other define ($define_page2) also FILENAME_DEFINE_MAIN_PAGE2

    so

    Code:
    $define_page2 = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_MAIN_PAGE2, 'false');
    then define the page name in ../includes/filenames.php

    Code:
    define('FILENAME_DEFINE_MAIN_PAGE2', 'define_main_page2');
    then place the file you want included in the html_include dir.


    as I said I HAVE NOT TESTED THIS - BACKUP FIRST !
    Last edited by crazycucumber; 11 Oct 2007 at 12:56 PM. Reason: added code tags
    Various Zen cart sites !

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: New format for Index Page

    Or if you're not using your existing define_page_2 and define_page_3, perhaps you could just require those in tpl_index_default.php?
    - Maybe not... I haven't studied how that works and don't have any time right now. Look at how other define page files are required - that may show you how to phrase it...

  5. #5
    Join Date
    Oct 2007
    Posts
    26
    Plugin Contributions
    0

    Default Re: New format for Index Page

    Now you've lost me. When you say, "then place the file you want included in the html_include dir. ", where exactly are you talkig about? Or should I say what are you referring to? Also, where would you be able to edit/add the text I want to add?

    Thanks for your help!

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: New format for Index Page

    The directions in post 3 refer to making a new define_main_page2.php file, which is where you would add the extra text, and it would be saved in the /html_includes/ folder.

  7. #7
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: New format for Index Page

    ghj42 is correct , sorry if i was not clear enough.

    one way would be to find your original define_main_page.php in your html_includes directory as mentioned above , copy it and name it as you have already defined earlier , so call it define_main_page2.php and save it in the same place /html_includes/

    you may be able to edit the file in the wysiwyg editor built into the admin , but i prefer to edit the whole file in dreamweaver or kompozer as it gives me more control over it.

    hope that is clearer for you .
    Various Zen cart sites !

  8. #8
    Join Date
    Jul 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: New format for Index Page

    Thank you,
    This is the perfect solution.
    Works for me,
    Thanks again to everyone for help

    poldy

  9. #9
    Join Date
    Oct 2007
    Posts
    26
    Plugin Contributions
    0

    Default Re: New format for Index Page

    I have added the new files and it shows in my admin as "define_main_page2.php", but it still isn't showing on my site. I'm thinking I am being really dense and not pasting some of the code in the right spot. Step #1 says to paste the code further down the page. I have tried to paste it everywhere! It doesn't show anywhere on the page, not even the wrong location.

    Step #2 doesn't specify where to paste the modified code, so I've pasted it directly below the original code. Is this right?

    Finally, I have copied, modified and inserted the page in the html_include directory.

    Would you be so kind as to showing me the code around where the new code should be pasted? I am trying to add a new section to the bottom of the catagories. My thoughts are if I can do this, it would be easy to duplicate all the steps again for the other areas.

    Sorry to be so dense,

    Sue

  10. #10
    Join Date
    Jan 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: New format for Index Page

    Sue, did you ever get this working? I'm trying to move the "New Products" box above the main page text, but not having much joy at the moment. As soon as I move the box, the main page text disappears!
    Alison

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. 404 error for new file format download
    By nikerymis in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 8 Nov 2011, 06:09 PM
  2. [problem]index page, new product for this month
    By kitkitng in forum General Questions
    Replies: 2
    Last Post: 8 Jul 2011, 06:18 PM
  3. Replies: 3
    Last Post: 15 Nov 2010, 10:16 AM
  4. Index Page <New Products for> Product Arrangement
    By haredo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Apr 2007, 01:16 AM
  5. Index listing format change
    By hbtrading in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Jun 2006, 08:49 AM

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