Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Junior Mechanic
Posted
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
 
Posts: 2 | Registered: September 09, 2005Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 


™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.