panels, panels everywhere

13

Click here to load reader

Upload: merlinofchaos

Post on 04-Jul-2015

4.154 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Panels, Panels Everywhere

Panels, Panels Everywhere

And not a block in place!

Page 2: Panels, Panels Everywhere

What do I want to do

Re-think how you architect, design and implement a Drupal website.

Page 3: Panels, Panels Everywhere

Typical Drupal Design• Blue areas are regions

• Blocks in regions are unrelated to the content

• Have to use PHP snippets to make blocks context sensitive

• Can only place a block in one region

• All regions always render even when not displayed in page.tpl.php

Header

Left Sideb

ar

Footer

Righ

t Sideb

ar

Content

Page 4: Panels, Panels Everywhere

How Designers See A Page

• Everything on a page is a part of the content of that page, taken within the context of the entire site.

Content

Page 5: Panels, Panels Everywhere

Aw Crap, He’s Showing Us Code

Page.tpl.php

Page 6: Panels, Panels Everywhere

Workflow

• Requirements

• Architecture + Wireframes

• Comps

• Implementation

Page 7: Panels, Panels Everywhere

Page Manager

• Don’t just decorate what the site gives you.

• Do not let the page own the content, let the content own the page.

• List all your pages, or at least the page templates, in one place.

• Let your pages show what they want to show based upon things like content type, user access levels, current language, etc.

Page 8: Panels, Panels Everywhere

Create a page

• Decide where it lives.

– In Drupal, the URL controls the hierarchy. i.e, /members/admin is automatically under /members.

• Decide what its context is.

• Decide what content it displays.

Page 9: Panels, Panels Everywhere

You keep using that word. I do not think it means what you think it means.

• Pronunciation: \ k̍än- t̍ekst\• Function: noun• Etymology: Middle English, weaving together of words, from Latin

contextus connection of words, coherence, from contexere to weave together, from com- + texere to weave — more at technical

• Date: circa 1568• 1 : the parts of a discourse that surround a word or passage and can

throw light on its meaning2 : the interrelated conditions in which something exists or occurs :environment, setting <the historical context of the war>

• — con·text·less \- t̍ekst-ləs\ adjective• — con·tex·tu·al \kän- t̍eks-chə-wəl, kən-, -chəl, -chü-əl\ adjective• — con·tex·tu·al·ly adverb

Page 10: Panels, Panels Everywhere

Context in the sense of a Page

• All the data objects that you need in order to generate the content to display:

– Node

– User

– Language

– Taxonomy Term

– Forum

– Organic Group

Page 11: Panels, Panels Everywhere

Where do Contexts Come From?

• Arguments– /taxonomy/term/%term

– /forum/%forum

– /music/beatles/the-white-album/hey-jude

• Other contexts– Node author

– Node reference

• They just are

Page 12: Panels, Panels Everywhere

Why is this important?

• When you add a piece of content to a Page Manager Page, you can tell it which context it cares about.

• Node views need a node context.

• User profiles need a user context.

• Forum listings need a forum context.

• Views can accept contexts too!

Page 13: Panels, Panels Everywhere

Variants: Do You See What I See?

• Authenticated users need a richer experience?

• Local users should see more Local content on the front page?

• Separation of pages is not necessarily by path?

– As far as Drupal is concerned, all /node/% URLs are handled the same way. i.e, /node/2 and /node/3 use the same rendering mechanism. But my wireframes don't agree.