Bricks

Layouts are composed of Bricks

A brick is a sub-template part.

When your layout is Collection (plural), the availables bricks are : Grid, Toolbar, Filters.
When your layout is Item (singular), the availables bricks are : Form, Fly, Toolbar.

Bricks are instanced per default, but you can add/remove as your please.

Common bricks

Toolbar

A toolbar is a wrapper for tasks. Joomla components are using a toolbar object to define and render the possibles operations.
Cook is dealing for you with the visibility of the buttons according to the ACL accesses of the user.
You can create a front toolbar the same way than the back-end toolbar.



Collection / Plural bricks

Grid

Grids are simple lists. Cook is using this term to make difference simply speaking.
'List' is more used when we speak about arrays of objects.

Note: A grid brick is created inside a specific sub-template file: ../tmpl/xxxxx_grid.php

Filters

All filters are grouped together in a filter brick

 



Item / Singular bricks

Form

A form is a list of inputs to collect datas from the user.

Note: A grid brick is created inside a specific sub-template file: ../tmpl/xxxxx_form.php

 

Fly

A fly is a simple view or the datas for an item row.

 

Note: A grid brick is created inside a specific sub-template file: ../tmpl/xxxxx_fly.php

 



Properties

CSS Class

Define a CSS class to apply on the brick wrapper.

Brick alias

Define the alias af the brick.
When the brick is created in a file, the the file sub-template file name will become : .../tmpl/xxxx_myalias.php

Get Started