25
Panels 2 + Nodequeue 2 Editorial control of content presentation

Panels 2 and Nodequeue 2

Embed Size (px)

DESCRIPTION

Building a Drupal-based news site with Panels 2 and Nodequeue 2

Citation preview

Page 1: Panels 2 and Nodequeue 2

Panels 2 + Nodequeue 2

Editorial control of content presentation

Page 2: Panels 2 and Nodequeue 2

Objectives

• Create a simple “news” site• Create a complex front page that hints at our

content• Create “section” entry pages that lead the

user to content• Control what content is featured on these

pages• http://nodequeue.demo.logrus.com

Page 3: Panels 2 and Nodequeue 2
Page 4: Panels 2 and Nodequeue 2
Page 5: Panels 2 and Nodequeue 2
Page 6: Panels 2 and Nodequeue 2

Basic premise

• News articles can be any content type• Control sections by taxonomy• We’re not worrying about editorial control• We’re not publishing on a schedule

Page 7: Panels 2 and Nodequeue 2

Why these two modules?

• Finer layout control than blocks

• Lets each pane know about data on page

• Overrides basic pages• Pluggable and

expandable to handle more objects

• Lets the editor control order

• Lets the editor control length

• Automatically pairs with taxonomy

Panels Nodequeue

Page 8: Panels 2 and Nodequeue 2

What’s a queue?

5 4 3 2 1

This end of the queue is the Tail or Back

This end of the queue is the Tail or Back

This end of the queue is the

Head or Front

This end of the queue is the

Head or Front

New items are inserted at the tail of

the queue. If a queue has a

maximum size, the front of the queue is

popped off.

New items are inserted at the tail of

the queue. If a queue has a

maximum size, the front of the queue is

popped off.

Page 9: Panels 2 and Nodequeue 2

Featured Stories

1. Story A2. Story B3. Story C4. Story D5. Story E

Featured stories is a nodequeue with a maximum queue size of 5. Story A was

added first and is currently at the front of the queue. Story E was just added and is now

at the back of the queue.

Page 10: Panels 2 and Nodequeue 2

Featured Stories

1. Story B2. Story C3. Story D4. Story E5. Story F

When we added Story F to the queue, Story A

popped off the front and is no longer a featured

story.

Page 11: Panels 2 and Nodequeue 2

Lead Article

1. Story QThe Lead Article queue has a maximum size of one. Every time a new lead article is added to the queue, the former lead article is popped out, meaning there is

only ever one lead article at a time.

Page 12: Panels 2 and Nodequeue 2

Queues can be re-ordered

Page 13: Panels 2 and Nodequeue 2

Queues can be re-ordered

This is the front of the queue

Page 14: Panels 2 and Nodequeue 2

Queues can be re-ordered

And this is the back of the

queue

Page 15: Panels 2 and Nodequeue 2

That is, unless this box is checked:

Page 16: Panels 2 and Nodequeue 2

Queues can be re-ordered

When reversed, this is the back of the queue.

Page 17: Panels 2 and Nodequeue 2

Smartqueues

• One queue with many subqueues• Pluggable system• Can attach queues to arbitrary data• All queues have the same basic configuration• Many queues won’t clog up the UI• Subqueues are created as needed• Smartqueue taxonomy: 1 term, 1 subqueue

Page 18: Panels 2 and Nodequeue 2

Your average siteHeader

Left Sidebar

Footer

Right Sidebar

Content

Page 19: Panels 2 and Nodequeue 2

Panels: Content

Page 20: Panels 2 and Nodequeue 2

Now with panelsHeader

Left Sidebar

Footer

Right Sidebar

Page 21: Panels 2 and Nodequeue 2

Contexts are objects

• Nodes• Users• Taxonomy terms• Forms• Any other object someone writes a plugin for

Page 22: Panels 2 and Nodequeue 2

Context source: Arguments

http://www.example.com/node/12345

Node: Story XYZ

Page 23: Panels 2 and Nodequeue 2

Context source: Relationships

Node: Story XYZ

Taxonomy Term

Post Author

Node: Author Profile

Page 24: Panels 2 and Nodequeue 2

Context at workHeader

Left Sidebar

Footer

Right Sidebar

Node: Story XYZ

Taxonomy Term

Post Author

Node: Author Profile

Page 25: Panels 2 and Nodequeue 2

Node: Story XYZnode.tpl.php

node-panel-foo.tpl.php

Attached files

CCK Field Group

Add comment form