Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

jQuery Smarty - Smarty templating support for jQuery

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
balupton
Smarty Rookie


Joined: 15 Feb 2008
Posts: 11
Location: Perth, Australia

PostPosted: Fri Jul 23, 2010 9:48 am    Post subject: jQuery Smarty - Smarty templating support for jQuery Reply with quote

For all you jQuery and Ajax developers out there.

Quote:
The jQuery Smarty project supports the Smarty templating language (one of the most popular with PHP). This project supports a number of advanced features:

Pseudo variables You can use a special set of variables in a template such as the $smarty.foreach.theForeach.first variable that represents the current index of a template instance.

Ajax templates You can include template files automatically with AJAX by using {include file='include.tpl'}

OnChange: Auto Update Modifier By using the auto_update modifier, it will update the corresponding template block if any of the variables have changed. For example: {$title|default:"No title, so expect the rest to be blank as well..."|capitalize|auto_update}. or specify a selector to update: {$title|capitalize|auto_update:"title_span"}

OnChange: Event You can hook into variable onchange events and add your custom handler for instance if the $title variable updates, you can have a onchange handler to update document.title with the new value if the title variable changes.


Demo:
http://www.balupton.com/sandbox/jquery-smarty/demo/

Wiki:
http://wiki.github.com/balupton/jquery-smarty/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TNTC4
Smarty n00b


Joined: 13 Apr 2010
Posts: 2

PostPosted: Wed Sep 29, 2010 1:53 pm    Post subject: Reply with quote

Nice.
This is great job.
Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP