Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011

2,415 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,415
On SlideShare
0
From Embeds
0
Number of Embeds
1,033
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011

  1. 1. How To CreateCustom Layouts For Panels Module
  2. 2. Gold Sponsor ofDrupalCamp Kyiv 2011
  3. 3. Silver Sponsors ofDrupalCamp Kyiv 2011
  4. 4. Step by step Panel overview. Panel structure. Creation of custom layout. Use of custom layout. Custom layouts problem.
  5. 5. Panels overview1. 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)
  6. 6. Panel structure 1. Layouts.Administration → structure → panels → settings → panels pages
  7. 7. Panel structure 2. Layouts elements.Administration → structure → panels → layouts → add flexible layout
  8. 8. Panel structure2. Layouts elements.
  9. 9. Panel structure 2. Layouts elements.Administration → structure → pages → edit sites tempates → variants → content
  10. 10. Panel structure 3. What we have at html.The result is a seven nested blocks with standard classes.
  11. 11. Create custom layout 1. How to?Theme theme.info Layouts layout-name.tpl.php layout-name.inc
  12. 12. Create custom layout 2. theme.infoplugins[panels][layouts] = layouts
  13. 13. Create custom layout 3. layout-name.inc
  14. 14. Create custom layout 4. layout-name.tpl.php
  15. 15. Use custom layout Administration → structure → pages → edit sitetemplate → variants → template name → layout → miscellaneous (drop down)
  16. 16. Use of custom layout1. 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)
  17. 17. Custom layout problem1. Functions call (no preprocess_page)3. Can not create regions dynamically4. One *.inc file per layout
  18. 18. Thanks You.My Contacts:skype: romkacrvemail: rchernov@adyax.comicq: 264429514

×