| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Include tpl in static page | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I want to use htaccess to point to a static page as my home page. This is because my categories and other dynamic content will not be changing often, but my design will, and I do not want to have to call a developer every time I want to add a banner or a promotion to the front page. I am proficient in HTML CSS but not in smarty/php
However, I do want to include the quicksearch feature (quicksearch.tpl) in my static page. My static page is at root level (I skinned it to match the xcart theme exactly), so how do I go about including the quicksearch.tpl feature in my static page? Thanks P.S. I tried {PHP} {include file="skin/storesigns-2column/customer/quicksearch.tpl"} {/PHP} but that didnt work
__________________
4.4 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() You don't need the {php} tags and you don't need to include the skin directory. Something like this should be all you need:
Code:
|
|||||||||
#3
|
|||||||
|
|||||||
![]() That works, thanks. But is there a way to make it work on root level static pages.
The 'parse smarty tags' checkbox is enabled, but it is only for embedded static pages. Thanks
__________________
4.4 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Nope, not in static html files.
There are ways around this like adding something to htaccess so that all of your html files are parsed for php then adding X-Cart's php/smarty framework to the top of the html file, but I wouldn't recommend doing that. |
|||||||||
#5
|
|||||||
|
|||||||
![]() Do you mean adding
AddHandler application/x-httpd-php5 .html .htm to my htaccess What do I have to do (X4.4) to add the smarty php framework to the top of my html file? I'd like to try it this way. I think in the long run it will be simpler than using an embedded page.
__________________
4.4 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Typically if you need a new page with php/tpl functionality you would create another php page like the ones that X-Cart already includes, add an entry to customer/home_main.tpl, and add a new tpl file.
|
|||||||||
|
|||
X-Cart forums © 2001-2020
|