Templ: Processes templates embedded in the pages

Recommend this page to a friend!
     
  Info   View files Files   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 257 All time: 183 This week: 6Up
Version License JavaScript version Categories
templ 1.0MIT/X Consortium ...1.0Templates
Description 

Author

This object processes templates embedded in the pages.

It can parse a given template string and process it by replacing sections delimited by {% and %} character sequences.

The template engine supports replacing placeholders by variable values, replacing by variable object members, conditional sections, and iterate sections with array variables and modifiers to replace variable values before using them in the template.

Picture of Aliaksandr Astashenkau
Name: Aliaksandr Astashenkau <contact>
Classes: 1 package by
Country: Belarus Belarus
Age: 38
All time rank: 1022 in Belarus Belarus
Week rank: 6 Up1 in Belarus Belarus Up

  Files folder image Files (16)  
File Role Description
Files folder imagetests (13 files)
Accessible without login Plain text file templ.js Class Source
Accessible without login Plain text file templ.min.js Class Minified
Accessible without login Plain text file templ.modifiers.js Class Modifiers

  Files folder image Files (16)  /  tests  
File Role Description
  Accessible without login Plain text file 1.html Example Simple variable marker and for-loop
  Accessible without login Plain text file 10.html Example Using modifiers
  Accessible without login Plain text file 2.html Example For-loop, empty sequence
  Accessible without login Plain text file 3.html Example If-statement, true-branch
  Accessible without login Plain text file 4.html Example If-statement, without else-part
  Accessible without login Plain text file 5.html Example If-statement, false-branch but without else-part
  Accessible without login Plain text file 6.html Example Two if-statements, without else-branch and with else
  Accessible without login Plain text file 7.html Example If-block inside for-loop
  Accessible without login Plain text file 8.html Example For-loop inside if-block
  Accessible without login Plain text file 9.html Example Ternary operator
  Accessible without login HTML file index.html Data Index of examples
  Accessible without login Plain text file style.css Data CSS
  Accessible without login Plain text file utils.js Aux. JS utils

 Version Control Unique User Downloads Download Rankings  
 0%
Total:257
This week:0
All time:183
This week:6Up