PHP Classes

HTML preRender: Preprocess templates and assign form input values

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 878 All time: 4,007 This week: 455Up
Version License PHP version Categories
prerender-html 2.0GNU General Publi...5.0HTML, PHP 5, Templates
Description 

Author

This class can preprocess templates and assign form input values.

It can load an HTML template from a file or a text string and alter the page elements to change the page contents.

Currently it can append elements to the page head or body, change the values of tag attributes, change the page title, remove tags, change the inner HTML contents of a tag, and change form input values.

The class can also assign form input values from an array of request values.

Innovation Award
PHP Programming Innovation award winner
March 2012
Winner


Prize: One copy of RadPHP XE2
Most template engines required that the template designer inserts special marks on the template in order to identify where the template parameters should be inserted.

This class provides an alternative approach for determining where template parameters need to be inserted without having to explicitly mark insertion points.

It determines the position of the elements by the tag and name attributes like page titles and form inputs.

Manuel Lemos
Picture of mohamad Reza kavoosi
  Performance   Level  
Name: mohamad Reza kavoosi is available for providing paid consulting. Contact mohamad Reza kavoosi .
Classes: 5 packages by
Country: Iran Iran
Age: 36
All time rank: 7946 in Iran Iran
Week rank: 227 Up2 in Iran Iran Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Details

hi,This version of the class has more features than `Fillform` class and has been corrected disadvantages of it. It has separated programming in PHP and designing and done processing on designed template and then print them out. `Fillform` class is based on function preg, but this new class has been written based on domDocument and considered template or output HTML as a XML doc and check it and if necessary, will modify it. Features of class: ● Reading template or HTML doc from file address or as a string ● Adding tag or new content to content of head and body tag ● Setting title for page by titlepage function ● Changing or adding content to a tag ● Setting attribute for one or some tags. ● Finding one or some tags based on id, class, title and deleting tag or specified tags ● Working with forms □ Setting textbox value □ Selecting from dropdownlist □ Selecting an option through radiobuttons group □ Checking or unchecking a checkbox □ Setting value of hiddenfield ● Inserting or retrieving after submit the form ● Inserting a template into another template ● ... /*******************************************************************************/

  Files folder image Files (5)  
File Role Description
Accessible without login Plain text file example.php Example example use of class
Plain text file HTMLPreRender.php Class class HTMLPreRender
Accessible without login Plain text file index.tpl Data template file
Accessible without login Plain text file MaterPage.tpl Output template file
Accessible without login Plain text file readme.txt Doc. readme file

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:878
This week:0
All time:4,007
This week:455Up
 User Ratings  
 
 All time
Utility:66%StarStarStarStar
Consistency:66%StarStarStarStar
Documentation:66%StarStarStarStar
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:2240