Post on 14-Dec-2014
description
transcript
How To Create How To Create Custom Layouts For Custom Layouts For
Panels ModulePanels Module
Gold Sponsor ofDrupalCamp Kyiv 2011
Silver Sponsors ofDrupalCamp Kyiv 2011
Step by step
Panel overview. Panel structure. Creation of custom layout. Use of custom layout. Custom layouts problem.
Panels overview
1. Drag and drop content manager.
2. Customizable templates.
3. Layout visual design .
4. Place content within that layout:
a. Custom blocks
b. Existing node (by title, nid)
c. Miscellaneous (execute php, views)
d. Node (fields, node attributes)
e. Page elements (breadcrumbs, site logo, site name)
Panel structure
1. Layouts.
Administration → structure → panels → settings → panels pages
Panel structure
2. Layouts elements.
Administration → structure → panels → layouts
→ add flexible layout
Panel structure
2. Layouts elements.
Panel structure
2. Layouts elements.
Administration → structure → pages → edit sites tempates → variants → content
Panel structure
3. What we have at html.
The result is a seven nested blocks with The result is a seven nested blocks with standard classes.standard classes.
Create custom layout
1. How to?
layout-name.tpl.phplayout-name.inc
Theme
Layouts
theme.info
Create custom layout
2. theme.info
plugins[panels][layouts] = layoutsplugins[panels][layouts] = layouts
Create custom layout
3. layout-name.inc
Create custom layout
4. layout-name.tpl.php
Use custom layout
Administration → structure → pages → edit site template → variants → template name → layout →
miscellaneous (drop down)
Use of custom layout
1. Drag and drop content manager.
2. Customizable templates.
3. Layout visual design .
4. Place content within that layout:
a. Custom blocks
b. Existing node (by title, nid)
c. Miscellaneous (execute php, views)
d. Node (fields, node attributes)
e. Page elements (breadcrumbs, site logo, site name)
Custom layout problem
1. Functions call (no preprocess_page) Functions call (no preprocess_page)
3. Can not create regions dynamicallyCan not create regions dynamically
4. One *.inc file per layoutOne *.inc file per layout
Thanks You.Thanks You.
My Contacts:
skype: romkacrvromkacrv
email: rchernov@adyax.comrchernov@adyax.com
icq: 264429514