QuertyTemplates 1.0 Beta3 released

2009-02-22

QueryTemplates 1.0 Beta3 has been released and can be grabbed from download page.

There were many changes since 1.0 Beta1, which was first public release. Noteworthy things are:

  • Other languages support For today this is only JavaScript, but the infrastructure is ready for others. Planned are Ruby, Python and Perl is also considered. Any help from people fluent in mentioned languages can rapidly speed up it’s support shipment.
  • Generators are coming Most of QueryTemplates methods are injection methods. They reuses existing markup. First generator method, formFromVars(), takes form structure information, input wrapper template markup and generate full, usable form. Just like MVC form helpers. That’s something different from varsToForm, which reuses existing form.
  • Short parse() support For simple templates there’s no need for redundant sourceCollect(…)->parse()->source(…)->returnReplace(). Now, just do parse(…) to achieve same result.
  • Extended data targets Every rapid injection method can now be precisely targeted in jQuery-like manner, eg varsToSelectorBefore, varsToSelectorPrepend, even varsToSelectorAttr.
  • More callback support Callbacks are first class citizens in QueryTemplates, just after CSS selectors. Combining those two will give you great flexibility. You can now trigger callback after inserting each field using rapid injection methods.
  • codeToSelector/Stack New methods type giving ability to inserting raw code like vars or values. It should be combined with onlyPHP() and onlyJS() methods.

Full changelog

  • valuesToStack supports callbacks
  • valuesToStack/selector supports extended targets
  • added extended targets for varsToStack
  • added codeTo stack/selector methods with all targets
  • fixed support for dynamic (not-declared) object properties
  • added smarty-like filters for varPrint methods
  • added ifNotVar()
  • added onlyPHP(), onlyJS(), endOnly()
  • valuesTo… supports callbacks
  • added varPrintAttr()
  • added formFromVars()
  • cleaner PHP output
  • safe object member calls
  • loop supports objects
  • fixed generateName
  • added short parse() support
  • fixed cache system
  • added support for objects in varsToForm
  • fixed valuesToSelector
  • added JS support
  • tons of small fixes

Download form download page or checkout using SVN.


First public release: QueryTemplates 1.0 Beta1

2008-12-03

QueryTemplates is a PHP templating engine using pure HTML files in popular web 2.0 pattern load-traverse-modify using jQuery-like chainable API.

This is first public release of the library, althought it’s enough stable and feature-rich to be 1.0 version. Remember, this is still a beta.

QueryTemplates reuses code from plainTemplates (which was kind of pattern prototype) and phpQuery, which is a DOM engine and heart of QueryTemplates.

Please check extensive examples on the wiki, download release package and even working blog implementation using CakePHP framework.


Follow

Get every new post delivered to your Inbox.