Skip to content

Layout Rendering with Rb fw

mManishTrivedi edited this page Nov 25, 2014 · 3 revisions

How to render Layout?

Rb_HelperTemplate::renderLayout($layoutFile, $displayData, $defaultPath, $options)  

OR

$layout_file = new Rb_LayoutFile($layoutFile, $defaultPath, $options);  
$output = $layout_file->render($displayData)  

$layoutFile : File name without extension.
$displayData : data will be populated into layout file.
$defaultPath : Default path of file
$options : Optional custom options to load. JRegistry or array format.

Sequence of Layout-Path (High to low)

  1. templates/MY_CURRENT_TEMPLATE/html/layouts/COM_MYCOMPONENT
  2. templates/MY_CURRENT_TEMPLATE/html/layouts
  3. components/COM_MYCOMPONENT/layouts
  4. base_path (custom path set by me)
  5. layouts

Clone this wiki locally