Download presentation
Presentation is loading. Please wait.
Published byAntwan Parkey Modified over 10 years ago
1
Moving stuff around on your Drupal web pages Alex Bergin / @alexbergin@alexbergin Dept. Agriculture & Food @drupalwa
2
Background Websites are dynamic thats why were here, thats why we use Drupal. Not all pages will want to look the same @drupalwa
3
Scenarios Websites may have: – Homepage presenting a dashboard of content. – Content Pages: Basic pages, products, events, etc. – Index taxonomy term pages, landing pages. – Search results, sitemaps. – User profile pages. – And more! All of which may have different layouts. @drupalwa
4
SO HOW DO WE DO THIS IN DRUPAL? @drupalwa
5
Blocks @drupalwa
6
Blocks Baked into Drupal core since 4.x. Manage blocks in your themes regions. Suited for basic brochure sites. Problem: dozens of blocks for dozens of regions, not enabled for all pages? Problem: visibility conditions limited. Php in db bad mkay. @drupalwa
7
Options Various contributed modules make layout management easier: 1.Panels: http://drupal.org/project/panelshttp://drupal.org/project/panels 2.Context: http://drupal.org/project/contexthttp://drupal.org/project/context 3.Display Suite: http://drupal.org/project/dshttp://drupal.org/project/ds Well try go over each of these. @drupalwa
8
What do they basically do though Everything on the page Or, all themes body content region So you can use these modules in conjunction with Blocks and your theme regions, if you want to. Additionally, these things modules can use block content defined by other custom modules, themselves too Or perhaps only node content
9
1. Panels Module @drupalwa Screenshot courtesy of themonthly.com.au
10
1. Panels explained By the same legend as the Views module – Earl Miles (aka merlinofchaos). Since D4.7. Dependant on Ctools which includes the Page Manager module that is kind of required to use Panels. Panels module includes several modules: Panels, Mini Panels, Panel Nodes, and In-Place Panel Editor. @drupalwa
11
1. Panels explained. More.. Panels is path driven. So a panel object exists for nodes, node edit forms, search, etc. @drupalwa
12
Panels has its own terminology Of each panel, you have Variants, which each let you have different layouts, e.g. One for each content type. Each Variant can have a Layout set. Use built in panels layouts or write custom layout. @drupalwa
13
Panels has its own terminology Selection Rules, lets you define conditions in your Variants, e.g. Different layout for a different node content type. Contexts – allows you to draw on other material: content, views, etc. i.e. Product panel variant bring postage conditions node into context. Not to be confused with context module. @drupalwa
14
More on Panels Panels designed to be very extendable and powerful. Advanced plugin system via ctools for custom access controls, layouts, content blocks (content types), and block styles. Modules that extend Panels: – Panels Everywhere – Panelizer – like panel_node module @drupalwa
15
2. Context @drupalwa
16
2. Context Around since D5.x, fairly mature. Comes with Context, Context Layouts, Context UI. Create contexts by specifying conditions and then the reactions – be it blocks to show in a region. No field support though. @drupalwa
17
2. More on Context Relatively easy interface to manage. Addons for Context: – http://drupal.org/project/context_node - lets the content creator select which context to use for their node. http://drupal.org/project/context_node – http://drupal.org/project/context_by_node - automatically creates a context when the node is created (no official 7.x version available though). http://drupal.org/project/context_by_node @drupalwa
18
3. Display Suite (DS) @drupalwa
19
3. Display Suite Stable. Relatively new. Still catching on. Specially built for Drupal 7 Entities: nodes, users, terms, etc. Layouts – includes common layouts, but easy to create new layouts by drush instead of manually. View modes. i.e. Event has a full, teaser and monthly calendar view. @drupalwa
20
3. Display Suite Disable drupal blocks/regions setting. DS Custom Fields (not content fields) lets you create more flexible fields: – Code field - meta tags, tokens, php field. – Dynamic field – kind of like panels context. – Block field - how you add other module blocks block fields. – Preprocess fields – possibly lets other modules populate them? Havent used this myself. @drupalwa
21
3. Display Suite – Advanced Stuff Integration with panels layout manager. Integration with Views Displays. Re: Custom layouts with Drush, look for the ds-build argument in Drush help. Very decent screencasts here: http://bit.ly/ds-d7 http://bit.ly/ds-d7 @drupalwa
22
So what to use then? Based on Number of Installs: 1.Panels: 120,000 2.Context: 65,000 3.Display Suite (DS): 30,000 All growing, but DS growing the fastest. @drupalwa
23
So, what to use? Depends on your circumstances. – Basic Brochure site – blocks – For larger sites though: Panels is probably the most powerful, but has a steep learning curve. Context is probably the easiest of the lot to learn but still requires templating for laying out field content. Display Suite looks like it has a good balance of usability, and power. Probably the most exciting. @drupalwa
24
What to use, Continued.. All are Exportable to features. One way or another its probably possible to do anything in any of the layout modules. @drupalwa
25
Further Info Blocks vs. Context vs. Panels: http://www.lullabot.com/articles/assembling- pages-with-drupal http://www.lullabot.com/articles/assembling- pages-with-drupal Comparison of Layout Editors: http://groups.drupal.org/node/15851 http://groups.drupal.org/node/15851 DS vs. Panels: http://www.jyvesgarden.com/blog/display-suite- vs-panels http://www.jyvesgarden.com/blog/display-suite- vs-panels Great DS instructional videos: http://bit.ly/ds-d7http://bit.ly/ds-d7 @drupalwa
26
Whats ahead Drupal 8 Initiatives: Concept Model Thomas, Sam, anyone read up on this, please share? D8 discussions on the topic is found here: http://groups.drupal.org/node/227543 http://groups.drupal.org/node/227543 @drupalwa
27
Cheers to Thomas for organisingThomas these meetups month in month out!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.