How do you make a separate template for the frontpage that only has a center area, but yet have one or 2 columns on every other page?
Thanks,
C
How do you make a separate template for the frontpage that only has a center area, but yet have one or 2 columns on every other page?
Thanks,
C
Isn't this the same question you asked yesterday? http://www.zen-cart.com/forum/showthread.php?t=166857
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
If you're just wanting to hide the left and right columns on the Home Page ONLY, try adding this to your stylesheet.css:
That will hide those two columns on the Home Page ONLY, and leave them to show on all the rest of your pages.Code:#indexHomeBody #navColumnOne, #indexHomeBody #navColumnTwo {display: none;}
Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!
To answer your question, no it is not really the same question because I need two separte templates one on the frontpage and one for the rest of the pages and did not know how to do that.
I hide the columns right and left and then I will have to expand the size of the center panel just for the front page. will #indexCenterColumn {width: herenewpx; }or whatever that column is called take care of that problem?
Thank you for your help.
C
No, you don't need two separate templates. If you hide or turn off the sidebars using either the suggested method or the method described in tpl_main_page.php, the center column will expand to fill the space they occupied.
If you have a bunch of styling you want different for the homepage, you can create a stylesheet named index_home.css with all the rules that apply only to the homepage.
Last edited by gjh42; 27 Oct 2010 at 06:03 PM.
Have inserted the index statement several different places in the style sheet with no result. Last location shown below. Does it matter where it is inserted? Classic 1.3.9h Thank You!
#navColumnOne, #navColumnTwo {
background-color: transparent;
}
#indexHomeBody #navColumnOne, #indexHomeBody #navColumnTwo {display: none;}
If there is another rule for #navColumnOne after your new rule, any display: xxx; setting in that will override the new one. Try putting your new rule at the end of the stylesheet.
That part seems to be working, but now I see turning off columns on the category pages is needed also. Do I just add text to the previous change?
Thanks!
1.3.9h http: //www.naicsfurniture.com
PS I know there are other problems. Trying to work through them one at a time.
That won't work with just stylesheet rules, because there are several kinds of pages with a body id of #indexBody. You need to set flags in /includes/templates/your_template/common/tpl_main_page.php, as described in the comments at the top of that file.
Bookmarks