Skip to content

Configuration

Q edited this page Aug 17, 2020 · 12 revisions

Willow was designed to meet several specific developmental needs - the key aims are:

  • Simplify process for UI developers who are not comfortable moving between PHP and html, by shifting all logic away from templates
  • Provide global and granular control over display and format of data using template and file-based configuration options

Template Configuration

The simplest way to pass configuration options to willows is via template arguments, which are passed inside the argument tag, as shown in the following simple example:

Pass html markup with variable to willow

{~ ui~example {+ "<div class='row'>{{ variable }}</div>" +} ~}

The results are only rendered if the php function ( ui::example in this case ) is found, is public, returns data and the data is in the correct format - which is an array of strings or an array of strings and arrays ( only indexed arrays are accepted, keys don't need to be sequential, but in some cases this will make things simpler ) - Read more about data collecting

File-Based Configuration

@todo

Clone this wiki locally