Skip to content

Views: Add layout manager #7

@mihaivarga

Description

@mihaivarga

Add ability for users to create their own master layout .

By default system should require no layout.

It will still use default system included layout.

Layouts location:
/{module}/views/{skin}/layouts/

Layout file name:
{layout}.tpl

Layout structure:

It should contain the main html structure:

`

{$page_after_start_head|default:''}
{$system_metas}
<title>{$system_title}</title>
{$system_styles}
{$system_scripts}

{$page_before_close_head|default:''}
{$page_after_start_body|default:''}

{$system_noscript}

{$content}

{$page_before_close_body}
{$page_after_body} `

Including content templates is done by using {$content} variable.

Including system set scripts (js files) is done by using {$system_scripts} variable.

Including system set stylesheets (css files) is done by using {$system_styles} variable.

Including system metas is done using {$system_metas} variable.

Including system no script functionality is done using {$system_noscript}

Setting a different layout for display:

$this->system->setLayout('newlayout');

This will look for the layout file /modules/{module}/views/{skin}/layouts/newlayout.tpl and will render it.

There is no controller for the layout as it is only a templateing feature.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions