| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Completely custom home page (front page) | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Completely custom home page (front page)
I would like to completely customize my home/front page. I want to retain the main layout of the website (i.e., still use customer/en/body.tpl), but I want to remove the sidebar, add banners/slideshows, rotating quotes, etc. How can I get the front page to use a custom template file instead of having it be just another category list page?
__________________
X-Cart version 5.2 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Completely custom home page (front page)
I guess you mean the default/en/body.tpl template.
In X-Cart 5 there is no a single template that determines the layout. You can find most of templates that affect the layout under the skins/default/en/layout directory. main.center.left.tpl and main.center.right.tpl are the two that display sidebars. But instead of changing the templates, you should use isSidebarFirstVisible() and isSidebarSecondVisible() methods in your module (check how these methods are used to hide sidebars during checkout). Other templates (and widgets) get inserted into the page through @ListChild declaration. You may find this article useful - it explains how to find what templates/widgets appear on the page and how to alter them or add new ones: http://kb.x-cart.com/display/XDD/Step+2+-+applying+design+changes
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Completely custom home page (front page)
Thanks for the reply. I understand how to edit templates, but I simply cannot find a template file for the home (front) page. I tried changing main.tpl, body.tpl, and welcome.tpl, but none of those affect only the home page. From what I can tell, the front page is just a special category page, which means that if I edit the categories page template, I will be editing every category's page.
Bottom line: How can I define a custom template for only the home page of the site, and no other page?
__________________
X-Cart version 5.2 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Completely custom home page (front page)
You can check if it is the home page from your custom template:
https://forum.x-cart.com/showthread.php?t=73877 But the better way would be checking this in a widget class that renders the template (if there is one) and changing the template path returned in getDefaultTemplate() method accordingly. You may also check this article: http://kb.x-cart.com/display/XDD/How+to+find+out+what+page+is+currently+running
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|