Collection of template directives for PHP Fat-Free Framework

v1.2.2 2022-02-15 20:30 UTC

This package is auto-updated.

Last update: 2024-06-16 01:31:08 UTC


Template directives

Collection of different template directives for the PHP Fat-Free Framework.

This package gives you a base to write your own template tag handler (directive) easily. Therefore extend the \Template\TagHandler class and implement its build method. You can also have a look at the included, ready-to-use directives:


A collection of additional form-related HTML tag handlers for server side data handling to form / input / select / textarea elements.



This automatically registers the following directives: input, select, option, textarea, form.

Any data you set to the global POST variable is filled into the registered form elements accordingly. If you want to use a different hive key, you can do it like this:

// change source key

You can also fill the form fields dynamically based on the form name attribute:

<form name="contact">

The field target is then set to FORM.contact:


For more tests, see: http://f3.ikkez.de/formtest


Convert inline markdown text or render a file.

# Headline

You can write **markdown** here


<markdown src="path/to/file.md" />




Render image thumbnails automatically.


\Template\Tags\Image::init('image' [, $tmpl [, $options ] ] );


  • temp_dir, public accessable path for generated, temporary thumbnail images
  • file_type, default file type for dumped images, png, jpeg, gif or wbmp
  • default_quality, image quality, 0-100
  • not_found_fallback, fallback path for missing images
  • not_found_callback, define a callable function here that is executed when the image path was not found. The function receives the $filePath as first parameter.


<image src="path/to/image.jpg" width="200" />

Additional attributes:

  • width, target image width
  • height, maximum image height
  • crop, allow image to be cropped into width/height ratio
  • enlarge, size up image when source image is smaller than target size
  • quality, overwrite default quality