Skip to content
Q edited this page Aug 16, 2020 · 40 revisions

Willow is a simple, logic-less, template engine built for WordPress.

It has been designed to meet the needs of front-end and back-end developers by providing a small, yet powerful set of tags and tools to speed up template development and prototype iteration, and is heavily influenced by Mustache.

Currently this project is developed in the format of a WordPress plugin and has WordPress as a dependency ( using several functions from the platform ), but could eventually be ported to a stand-alone system.

The pages of the wiki will attempt to demonstrate some common use-cases of Willow as well as documenting its syntaxes and internal workings.

All Willow tags include a matching opening and closing pair, starting and ending with a curly bracket and one other internal character, as follows:


{~ willow ~}

Willows are the most commonly used tag, along with {{ variables }} and are essentially functions, they accept {+ arguments +} and {@ loops @} or [ flags ]

Example:

{~ ui~hello {+ <div>Willow says {{ hello }}</div> +} ~}

This tag call tries to find the ui ( context ) hello ( task ) method ( ui::hello() ) and wrap the return data in simple html:

Return:

<div>Willow says Hello</div>

Read more about Willow Tags



Footnote: Q Studio's normal workflow, sees Willow used as one part of a "trilogy" of key tools - the other 2 being the main Q Plugin and a parent / child theme combo built specifically to work with both Q and Willow - we will also publicly release parts of these other tools in the near future.

Clone this wiki locally