I'm currently working on altering the shop module a bit to my needs, but am having one question. How do I use the .tpl files as the templates instead of using the templates in the db records. Every time I have to change a thing in a template I have to go inside the admin and copy or edit directly from there... i want to be able to just edit in the .tpl file...
Any ideas??
Using .tpl instead og db templates?!?
Re: Using .tpl instead og db templates?!?
Therre is module "Template Externalizer" http://dev.cmsmadesimple.org/projects/externalizer
Also you can try using tags "{include}" or "{insert}" to use external templates. Later one is not being cached.
http://www.smarty.net/manual/en/languag ... nclude.php
http://www.smarty.net/manual/en/languag ... insert.php
Also you can try using tags "{include}" or "{insert}" to use external templates. Later one is not being cached.
http://www.smarty.net/manual/en/languag ... nclude.php
http://www.smarty.net/manual/en/languag ... insert.php
Re: Using .tpl instead og db templates?!?
Not quite... I want to replace this:
With an, mayby include...
Any ideas?
Code: Select all
$template = 'proddetail_template';
echo $this->ProcessTemplateFromDatabase($template);
Any ideas?
Re: Using .tpl instead og db templates?!?
If you want to hack the code, I think you can use ProcessTemplate instead of ProcessTemplateFromDatabase
See: http://www.cmsmadesimple.org/apidoc/CMS ... ssTemplate
Note that it is not very wise to hack the original code regarding to future updates. You will also loose support.
See: http://www.cmsmadesimple.org/apidoc/CMS ... ssTemplate
Note that it is not very wise to hack the original code regarding to future updates. You will also loose support.
Last edited by Jos on Sat Mar 13, 2010 11:24 am, edited 1 time in total.
Re: Using .tpl instead og db templates?!?
Well, in DB template paste only tag "{include ...}" that refers to optional file template 

Re: Using .tpl instead og db templates?!?
Thanks... just what I needed...Jos wrote: If you want to hack the code, I think you can use ProcessTemplate instead of ProcessTemplateFromDatabase

Re: Using .tpl instead og db templates?!?
I think Peciura last suggestion is much nicer and will get you the same result but without the worry about future upgrades ;)