Skip to content

Views: Add layout manager #7

Open

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.

Activity

  1. self-assigned this
    on Jan 5, 2015
  2. added this to the 3.0 milestone on Jan 5, 2015
  3. modified the milestones: 2.8, 3.0 on Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions