Presentation is loading. Please wait.

Presentation is loading. Please wait.

Moving stuff around on your Drupal web pages Alex Bergin / Dept. Agriculture &

Similar presentations


Presentation on theme: "Moving stuff around on your Drupal web pages Alex Bergin / Dept. Agriculture &"— Presentation transcript:

1 Moving stuff around on your Drupal web pages Alex Bergin / Dept. Agriculture &

2 Background Websites are dynamic thats why were here, thats why we use Drupal. Not all pages will want to look the

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

4 SO HOW DO WE DO THIS IN

5

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

7 Options Various contributed modules make layout management easier: 1.Panels: 2.Context: 3.Display Suite: Well try go over each of

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 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

11 1. Panels explained. More.. Panels is path driven. So a panel object exists for nodes, node edit forms, search,

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

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

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

15 2.

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

17 2. More on Context Relatively easy interface to manage. Addons for Context: – - lets the content creator select which context to use for their node. – - automatically creates a context when the node is created (no official 7.x version available though).

18 3. Display Suite

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

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

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:

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

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

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

25 Further Info Blocks vs. Context vs. Panels: pages-with-drupal pages-with-drupal Comparison of Layout Editors: DS vs. Panels: vs-panels vs-panels Great DS instructional videos:

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:

27 Cheers to Thomas for organisingThomas these meetups month in month out!


Download ppt "Moving stuff around on your Drupal web pages Alex Bergin / Dept. Agriculture &"

Similar presentations


Ads by Google