Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Libraries

    FXL Template 2.1.1

    Download button

    No screenshots available
    Downloads: 354  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Steffen Reinecke | More programs
    LGPL / FREE
    September 6th, 2010, 11:47 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    FXL Template description

    An easy to use template engine covering all the basic features of a template system.

    FXL Template is an easy to use template engine that covers all the basic features of a template system. It supports simple text/array assignments, blocks and nested blocks. Well- used regular expressions and the simple markup are responsible for quick rendering. The template markup is really easy to learn - even for people not into programming. Everything can be done with just two types of place holders. For high traffic enviroments you are invited to test our "memcached" cache extension.

    hello world example:
    Template (example.tpl)

    {greeting}

    PHP-Code (demo.php)

    require_once 'fxl_template.inc.php';

    $fxlt = new fxl_template('example.tpl');
    $fxlt- >assign('greeting', 'hello world!');
    $fxlt- >display;


    Output

    hello world!

    more complex example:
    Template (example.tpl)

    < table >
     < !-- START row -- >
     < tr >
     < !-- START cell -- >< td >{td_value}< /td >< !-- END cell -- >
     < /tr >
     < !-- END row -- >
    < /table >


    PHP-Code (demo.php)

    require_once 'fxl_template.inc.php';

    $fxlt = new fxl_template('example.tpl');
    $fxlt_row = $fxlt- >get_block('row');
    $fxlt_cell = $fxlt_row- >get_block('cell');
    for ($tr = 1; $tr < = 3; $tr++) {
     for ($td = 1; $td < = 3; $td++) {
     $fxlt_cell- >assign('td_value', $tr.':'.$td);
     $fxlt_row- >assign('cell', $fxlt_cell);
     $fxlt_cell- >clear();
     }
     $fxlt- >assign('row', $fxlt_row);
     $fxlt_row- >clear();
    }
    $fxlt- >display();


    Output

    < table >
     < tr >
     < td >1:1< /td >< td >1:2< /td >< td >1:3< /td >
     < /tr >
     < tr >
     < td >2:1< /td >< td >2:2< /td >< td >2:3< /td >
     < /tr >
     < tr >
     < td >3:1< /td >< td >3:2< /td >< td >3:3< /td >
     < /tr >

    < /table >


    Product's homepage

    Requirements:

    · PHP 5.1 or later
    · Memcache extension
    · setup of pcre.backtrack_limit, pcre.recursion_limit (PHP 5.2+)

    What's New in This Release: [ read full changelog ]

    · The assign_block function was broken.
    · A shortcut for assign_block was added.
    · PHPUnit test cases were added.
    · The documentation was updated and provides more examples.
    · Performance was improved by reducing file system access.

      


    TAGS:

    template engine | template system | template | engine | blocks



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM