Smart.Framework Logo

final class \SmartTemplating
{ } ::

Provides an easy to use connector for All available Templating Engines inside the Smart.Framework at once.
Depending upon the file name extension will choose to render as:
some-file.mtpl.htm : SmartMarkersTemplating (Marker-TPL syntax: .mtpl.)
some-file.twist.htm : \SmartModExtLib\TplTwist\SmartTwistTemplating (Twist-TPL syntax: .twist.)
some-file.twig.htm : \SmartModExtLib\TplTwig\SmartTwigTemplating (Twig-TPL syntax: .twig.)
some-file.t3fluid.htm : \SmartModExtLib\TplTypo3Fluid\SmartTypo3FluidTemplating (Typo3Fluid-TPL syntax: .t3fluid.)


class Methods

public static function render_file_template ( $file, $arr_vars = [], $options = [] ) {} :: 

class Properties


class Constants


Sample code: PHP

<?php

// Sample: use this code in a controller of Smart.Framework (after you install the Smart.Framework.Modules)
 
$this->PageViewSetVar(
     
'main',
     
SmartTemplating::render_file_template(
         
'modules/my-module-name/views/my-view.(mtpl|twist|twig|t3fluid).htm',
         [
             
'someVar' => 'Hello World',
             
'otherVar' => date('Y-m-d H:i:s')
         ]
     )
 );

// #end php code


documentation generated on: 2023-10-19 23:15:56 +0000


Smart.Framework © 2009-2023 unix-world.org