-
Notifications
You must be signed in to change notification settings - Fork 1
Droplet Service
With Droplets you can execute small php scripts inside any WYSIWYG section. The placeholder for a Droplet can also placed within the HTML parts of your php template script, for example:
<div class="search">
<!-- show the search box -->
[[searchbox?msg='Search this site ...']]
</div>
The Droplet will be executed after the template is completely executed and just before the page will be shown in the browser of the visitor.
To speed up the process a little bit, just execute the Droplet in place and at the same time as the template will be created, use $template['droplet']->execute():
<div class="search">
<?php
$template['droplet']->execute('searchbox', array(
'msg' => 'Search this site ...'));
?>
</div>
Parameters for the Droplet can be attached as array (see above).
You can also execute Droplets within twig templates, use {{ droplet() }}:
<div class="search">
{# show the search box #}
{{ droplet('searchbox', {'msg':'Search this site ...'}) }}
</div>
- If you spot a typo or want to contribute an article, a how-to or a tip, feel free to edit the Wiki directly
- If you you have any questions, please visit the phpManufaktur Support Forum
This Documentation is part of the kitFramework Project
© 2014 by phpManufaktur, kitFramework and TemplateTools are published under MIT license.