Extension:Views

The Views extension brings some templating in dev process to separate HTML and PHP which allows to avoid inline HTML.

Instead of using inline HTML blocks in PHP, just use Views.

Usage
<? echo $a ?> Somewhere in your code call Views: $data = array( $a => 'hello' ); $html = Views::forge('template', $data); This will parse template, extract variables and return result into $html variable.
 * 1) While developing an extension create directory called "views" in your extension folder.
 * 2) Place some standard php-templates in this directory, for example: template.php with contents

Result will be: hello 

Thats it!