panels 2 and nodequeue 2
DESCRIPTION
Building a Drupal-based news site with Panels 2 and Nodequeue 2TRANSCRIPT
![Page 1: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/1.jpg)
Panels 2 + Nodequeue 2
Editorial control of content presentation
![Page 2: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/2.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/3.jpg)
![Page 4: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/4.jpg)
![Page 5: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/5.jpg)
![Page 6: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/6.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/7.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/8.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/9.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/10.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/11.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/12.jpg)
Queues can be re-ordered
![Page 13: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/13.jpg)
Queues can be re-ordered
This is the front of the queue
![Page 14: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/14.jpg)
Queues can be re-ordered
And this is the back of the
queue
![Page 15: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/15.jpg)
That is, unless this box is checked:
![Page 16: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/16.jpg)
Queues can be re-ordered
When reversed, this is the back of the queue.
![Page 17: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/17.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/18.jpg)
Your average siteHeader
Left Sidebar
Footer
Right Sidebar
Content
![Page 19: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/19.jpg)
Panels: Content
![Page 20: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/20.jpg)
Now with panelsHeader
Left Sidebar
Footer
Right Sidebar
![Page 21: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/21.jpg)
Contexts are objects
• Nodes• Users• Taxonomy terms• Forms• Any other object someone writes a plugin for
![Page 22: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/22.jpg)
Context source: Arguments
http://www.example.com/node/12345
Node: Story XYZ
![Page 23: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/23.jpg)
Context source: Relationships
Node: Story XYZ
Taxonomy Term
Post Author
Node: Author Profile
![Page 24: Panels 2 and Nodequeue 2](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/24.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061211/54928384b4795939138b4682/html5/thumbnails/25.jpg)
Node: Story XYZnode.tpl.php
node-panel-foo.tpl.php
Attached files
CCK Field Group
Add comment form