Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2011
    Posts
    3
    Plugin Contributions
    0

    Default Front page template question

    I'm having a template converted from from static to Zen-Cart and the index page of the template has no Zen-cart elements. Is it possible to insert a new "homepage" into Zen-Cart or should this be a standalone page outside of the Zen-cart system with links to the ZC elements - of course I'd prefer the first option?

    I'm not too familiar with Zen-cart, but an ZC expert's advice will be greatly appreciated and understood.

    Thank you!

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

    Default Re: Front page template question

    You can put the main/center column content into define_main_page.php (in Tools > Define Page Editor), but the rest of the index page will need to be split out and put into the appropriate files for the page part. We can give some more detailed advice if we can see your original homepage, preferably a live link so we can look at the code behind it and how it interacts with other pages. Is the index page radically different from interior pages?

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

    Default Re: Front page template question

    Okay, for the Template Monster homepage template you showed me, your best bet would be to turn off sideboxes and probably header for the homepage in /includes/templates/your_template/common/tpl_main_page.php (instructions in the comments in that file). Then put the content of the page HTML source code (starting with <div id="main-tail-bot">) in define_main_page.php. That template has a bunch of javascripts doing various things, and you would need to integrate those following Zen Cart methods to get them to work. There is info on using javascript in the wiki as well as the forum. The menu links would need to be coded to point to the desired locations, which is a simple matter. This template has an unnecessarily huge number of divs enclosing its elements as usual with TM, but not much other bad code.
    You would want to put the styling that is relevant to this homepage into a file named index_home.css, saved in /includes/templates/your_template/css/.

  4. #4
    Join Date
    Sep 2011
    Posts
    3
    Plugin Contributions
    0

    Default Re: Front page template question

    Thank you very much for that helpful information. Now I have enough to know what will be involved in the conversion. I am worried about the javascript, is this a problem that tends to come up in these cases with ZC?

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

    Default Re: Front page template question

    Not exactly a "problem"... Zen Cart has methods for automatically handling javascript files, but they need to be named amd placed correctly. The usual "add the script to the head" that people hear elsewhere can work, but you would then need to manually update it every time you upgrade ZC, and it might not validate.

 

 

Similar Threads

  1. v150 Template front page before website...
    By rainbow_pixie_star in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 10 Aug 2013, 08:44 AM
  2. Front page Question
    By david52 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Jun 2010, 06:17 PM
  3. Question about home/front page
    By hollettster in forum General Questions
    Replies: 4
    Last Post: 18 Aug 2009, 06:00 AM
  4. Using Darkness template-Customizing front page?????
    By hybridwookie in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Aug 2007, 10:38 AM
  5. question on front page layout
    By Linux in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 2 Oct 2006, 08:45 PM

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