Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
User's Created Tips and Insights
Using PHP, Smarty and SiteSpinner|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Junior Mechanic |
Using PHPs excellent Smarty template engine, one can absolutely separate code from design.
Do do this : 1. Make a desing in sitespinner 2. Publish directly into the samrty templates directory 3. Insert this code to prevent CSS / JS errors
function css_image_fix($tpl_source, &$smarty)
{
$out = str_replace('<style','{literal}<style',$tpl_source);
$out = str_replace('SRC=".','SRC="./templates',$out);
$out = str_replace('<script','{literal}<script',$out);
$out = str_replace('</script','{/literal}</script',$out);
return str_replace('</style>','</style>{/literal}',$out);
}
$smarty->register_prefilter("css_image_fix");
Use the page as template; the code will take care of picture paths and excluding CSS and JS from parsing ! I think the combination (Sitespinner, PHP(Mysql) and Smarty) make a killer webapp RAD combination. more about smarty : Here more about php : Here Kind regards, Pim Koeman, The Netherlands |
||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
User's Created Tips and Insights
Using PHP, Smarty and SiteSpinner
