![]() |
TPL files and their links to PHP files
I'm in the midst of building a new template and trying to understand how the tpl files link to the php files they are associated with. For example, I look at search.tpl in the main directory (there are 3 others and 2 of them may be the same?) and there is no less than 4 search.php files located in various places.
I guess my main question is: How does the info from the search form know where it's getting posted too? Or how can I trace the path? If I have a new tpl file located in skin\, where should the corresponding PHP file be located? Thanks, Adam |
Re: TPL files and their links to PHP files
Hi,
1. Quote:
2. Quote:
They will link the php and tpl file using the smarty variables. EX: PHP-> you can find the smarty variable in each php file like this $smarty->assign("main","search"); TPL:In common templete There will be file called common_templete.tpl in skin1/root like this {else if $main eq search} {include file="tpl file name"} Quote:
|
Re: TPL files and their links to PHP files
Thanks for the help.
So in skin1\customer\search.tpl this line of code: <form method="post" action="search.php" name="productsearchform"> Which of the 4 search.php files does it post the data to and is that connection made in the corresponding php file? Adam |
Re: TPL files and their links to PHP files
hi,
If you currently in customer side then this form is submited to xcart root/search.php Quote:
|
All times are GMT -8. The time now is 03:42 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.