callElementByPath

Navigation:  Development > Function Reference > Helpers > Utility >

callElementByPath

Previous pageReturn to chapter overviewNext page

Load a HTML template inside another template.

 

App::Utility()->callElementByPath(path,[Options])

 

 

Parameter

Description

path

Path of the Template file

Options

Pass variable in included template. Array index of options array in will convert in variable name.
For example:

array("action"=>"change","list"=>array("id"=>5,"note"=>"Comments"))

 
In template $action and $list variable will contain 5 and array("id"=>5,"note"=>"Comments") respectively.

 

See bellow example:
 
echo App::Utility()
    ->callElementByPath(
        App::Config()->rootDir("/development/view/rainbow/elements/quicklinks.phtml"),
       array("action"=>"change","list"=>array("id"=>5,"note"=>"Comments"))
    );