PHP Classes
elePHPant
Icontem

ubtemplate: Template engine based on block replacing

Recommend this page to a friend!
  Info   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-01-12 (7 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 288 All time: 7,080 This week: 1,099Up
Version License PHP version Categories
ubtemplate 1.0Freeware5.0PHP 5, Templates
Description Author

This package implements a template engine based on block replacing.

It can process a template with blocks delimited by named marks.

The class supports several types of blocks that represent template variables to be replaced, nested blocks, iterative blocks and blocks defined in separate template files.

The processed template data is returned as a string.

Picture of Reynier Blanco
Name: Reynier Blanco <contact>
Classes: 6 packages by
Country: Cuba Cuba

Details
	This class allows the manipulation of a file. "Tpl" with a format accessible to the developer with the aim of generating text
strings with variable cycles and dependence. It is very comfortable and easy to create a page that requires a certain location 
or value of variable such as the creation of a table where we would have to make a cycle within the HTML code making the text 
nearly unreadable, in addition to add some complexity. Well, using this template does not need to concern ourselves with that 
because it set the template that is responsible for properly engage the blocks.

Elements and expressions
1. Block
	[<block_name>]
	Block of information that will be added when parsing the block
	[</block_name>]

	block_name => identifies the block when you want to include it or put it inside another block as a unit

2. Variables
	{{var_name}}

	var_name => identifies the variable in case you want to pass a value for it, if not pass any Value simply 
				by sustitye empty ""

3. Blocks dependents
	{<{block_name}>}

	block_name => identifies the block to be included within another, if the bloc does not exist is launched An error.

4. Dependent multiple blocks
	{<<{block_name}>>}

	block_name => identifies the block you want to include more than one vexz within another, where the block 
				there was no spear, you miss an array with information for each iteration of a block error.

5. IncluciĆ³n other files
	@include filename

	filename => identifies the file that is needed is included at the same time as this, whether that is this 
				using a block that is in that file, or otherwise
  Files folder image Files  
File Role Description
Accessible without login Plain text file ex.tpl Data file tpl
Accessible without login Plain text file include.tpl Data file tpl
Accessible without login Plain text file index.php Example ejemplo
Plain text file option.php Class class example
Accessible without login Plain text file readme_en.txt Doc. description
Accessible without login Plain text file readme_es.txt Doc. description in spanish
Plain text file template.php Class Main Class
Plain text file test_d.php Class class example

 Version Control Unique User Downloads Download Rankings  
 0%
Total:288
This week:0
All time:7,080
This week:1,099Up