|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
balupton Smarty Rookie
Joined: 15 Feb 2008 Posts: 11 Location: Perth, Australia
|
Posted: Fri Jul 23, 2010 9:48 am Post subject: jQuery Smarty - Smarty templating support for jQuery |
|
|
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 |
|
TNTC4 Smarty n00b
Joined: 13 Apr 2010 Posts: 2
|
Posted: Wed Sep 29, 2010 1:53 pm Post subject: |
|
|
Nice.
This is great job.
Thanks. |
|
Back to top |
|
|
|
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
|