×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles
    Revision as of 19:23, 24 October 2006 by imported>mutante

    Smarty ist eine recht stark verbreitete und dadurch ziemlich ausgereifte open source template engine für PHP.

    Man setzt im PHP-Quellcode nur noch Werte die der Designer dann später leicht nutzen kann. zb so:

    $Smarty->assign("varnamefuertemplate", $phpvariable);
    

    (wobei $phpvariable auch zB ein array sein kann). im template (extra files, die auf .tpl enden und hauptsächlich reinen HTML-code enthalten) kann man dann z.b. schreiben:

    "Hallo {$name}, du bist eingelogt"
    

    oder listen machen mit:

    <table><tr><td>nr</td><td>name</td></tr> {foreach item=foo from=$var

    "One of Smartys primary design goals is to facilitate the separation of application code from presentation. Typically, the application code is maintained by programmers. The presentation templates are maintained by template designers."


    Template loop detected: Template:Stub

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.