Layouts

Layouts are kind of templates files, but they do not refers to a particular view.
Let's call them headless layouts.

You can create any kind of tree structure inside the 'layouts' folder of your component, and then call them with an easy syntax.

Declaration

Have a look in the given example in your component:

layouts/form/fieldset.php

The layout recieve the datas trough $displayData array.

Instance the layout

echo JLayoutHelper::render('form.fieldset', array(
    'fieldset' => $fieldset
));

form.fieldset is the namespace wich will automatically load :
layouts/form/fieldset.php

learn more : JLayout

Freakin' Awesome!!! J-Cook is simply awesome - whether you're a highly experienced developer or complete novice whether you're building a small inventory component or a complete community solution! The beauty comes from a fast slick and reliable platform that readily provides developers with everything they'll need to build the backbone of a solid and secure component with wizards for authoring access publishing aliasing created/modified by dates... you name it COOK provides it! J-Cook really surpasses all of the 'competition' as far as MVC tools are concerned! Try love it and get cooking!
learnthrusong (JED)
          

Get Started