Dwoo is a modern, flexible and oriented object template engine for PHP, which among other things allows you to add some logic to templates. The Dwoo Template Engine Plugin for Contact Enhanced allows you to use Dwoo template engine in Contact Enhanced templates.
Dwoo Template Engine Plugin is included in Contact Enhanced PRO for version 3.8 and newer
The plugin is located in the Bonus package inside the Contact Enhanced's downloadble zip archive. The installation is just like any other Joomla extension. Go to Extensions -> Manage -> Install, then upload and install the extension.
Go to Extensions -> Plugin manager, search dor Dwoo and enable it;
Then go to Components -> Contact Enhanced -> Templates and edit your template so you can use the template engine.
Each Contact Enhanced Form Field Alias becames a variable in the HTML Template. For the example below let's assume you have a Contact Enhanced Form with the following Field's
Field Type | Field Alias | Field Value type |
---|---|---|
Radio box | referrer | string |
Checkbox | subscriptions | array |
{* This is a comment *} {* We will add special message if the referrer was a friend *} {if $referrer == 'Friend'} A text to display in the template and then display an image: <img src="/https://yourdomain.com/path/to/image.png" /> {/if} {* Checkboxes fields will result in an array of values, so we have to make sure the field is submitted *} {if is_array($subscriptions)} {$subscriptions_label}: <ul> {foreach $subscriptions sub} <li>{$sub}</li> {/foreach} </ul> {/if}
For a full syntax documentation, please read the Dwoo Documentation page.
Copyright © 2018 IdealExtensions.com. All Rights Reserved.