![]() |
Include tpl in static page
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 |
Re: Include tpl in static page
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:
{include file="customer/quicksearch.tpl"} |
Re: Include tpl in static page
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 |
Re: Include tpl in static page
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. |
Re: Include tpl in static page
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. |
Re: Include tpl in static page
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.
|
All times are GMT -8. The time now is 02:37 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.