Skip navigation.

Raphael's Blog

A look into a programmer's life

x64Template -> The new template engine

Today I started with the development of a new template engine based on the current bTemplate code, adding more features (even plugins) and completely documenting the code by using phpDoc comments format so the documentation can be done easily.

This is the current change log:
  1. Changed the documentation to phpDoc format
  2. Added plugins support
  3. Changed some variable and function names by prepending a '_' so it is easier to identify private functions/variables from global ones.
  4. Added the x64Template::append() function so an already set value/array can be changed by appending content, and if it is an array, merging it.
  5. Added more information for some functions so a developer could easily find out that some of the current class functions can be used for retrieving data from the template


... the most important features are going to be these:
  • Add support for ifs in arrays
  • Add a template syntax checker, which will be helpful for developers to find out mistakes in their templates
  • Improve the if tags, allowing the template to use tags like
    {if:{tag:user_name}={tag:administrator_name}}
    Welcome {tag:administrator_name}, how many people you want to kick today? :)
    {else:{tag:user_name}={tag:administrator_name}}{/if:{tag:user_name}={tag:administrator_name}}
    Welcome {tag:user_name}
    {/if:{tag:user_name}={tag:administrator_name}}



This new template will be used instead of bTemplate in all my projects where I need a template engine, providing a lot of new features to all my current projects and preventing me from writing more code to do some stuff that bTemplate can't do.

Atomo64... now powered by Debian Sargex64Template 1.0 ready

Comments

Anonymous 21. November 2007, 16:31

someone writes:

honestly, this template style sucks :/ all templates based on {} tags make me feel sick :/

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies