09/12/09 December User Group meeting

Events happening in the community are now at Drupal community events on www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

1) I've included what I (drewid) could capture about on-screen activity in case it's helpful, but I realize it probably won't make sense to anyone who wasn't there.
2) In my notes, I have tried to follow the convention of capitalizing the names of modules, but since I am still learning the nomenclature of Drupal, I am sure there are inaccuracies.
3) I didn't include links to sites that were shown, in case it wasn't permissible by the content owner. Presenters, please add them in if you feel comfortable allowing them to be shared.

Synopsis - Three presentations about Panels and content theming: jhedstrom presented on Context, shifthappens presented on Panels, and emptyvoid presented part of his presentation on Node Reference, the rest to be at the next PDX Drupal meeting.


jhedstrom - Context Presentation

Context is a way of setting conditions to which your site reacts to.

The problem Context helps address is with giving Block visibility control to end users without giving them admin access to the Blocks settings which would overwelm them.

The quickest way to demonstrate this is with blog content type. Say we want the "Who's Online" block on the right side bar but only in the blog section.

(Demonstration)
Fill out required fields (add new context)
- Set conditions
- View content of type blog
Under conditions have reactions
Regions are defined by themes
(selects a view he had defined already)

You could do this with blocks and adjust its visibility settings but that gets really tedious.

You can edit a context as well
(demonstrates adding the same view to the home page)
You can edit the path, like a block, to show the "Who's logged in" block on the home page

If you enable context contribs, you can set a context based on a view

CCK3, allows you to create field groups. This allows for user to add a block to the page content from the page edit and to reorder the blocks

Namespace and attribute
you can only have one active context. The first one activated will override any others that are triggered, however selecting site wide does not contradict.

Another benefit of Context is that you can change the Context, push it to development server and enable it to test it there before you roll it into the production environment.

Q: How is performance with Context?
A: There is probably some overhead because it takes over before the Block function but not much.

Q: Is there any easy way to ... nodal search?
attributes at the top of edit context
namespace and attribute become more important
some fired on hook_init
some fired on node api
if you call it too early, you might not catch it

Q: Is it easy to create custom conditions, say arguments for Views?
A: yes

(missing - a piece on a long bug report about internationalization issues with Context)


shifthappens - Panels Presentation

Contact him via sifthappens on Drupal.org or via aHa consulting.

What is Panels? Panels is fairly complex and hard to describe in only five minutes

Everyone is familiar with regions right? These define where you can place stuff, except for in the main content region where nodes show up.

Panels came about so you could place content in the main content region to provide more flexibility for placing content. It has evolved since then around the idea of context. People are moving away from Panels towards more contextual stuff like the module Context which is the next step forward from Panels.

(Demonstrates Panels in terms of context - http://XXXX)

The problem we were having with the site was that it was really difficult to show related fields between pages. For example, the Project content type. We wanted to display the fields in different regions and pull in fields from related pages, an example would be references to videos about the project from city council meetings.

(Click on meeting content type)
Does node refer aspect and pulls in the meeting
Content type is a two column display, which fields go into it, and a one column beneath it.

What he uses Context for now? Dashboard pages.
For instance, on the home page so that users and rearrange content via a WYSISWG drag and drop interface.

What the client can do, add and drop things into Views and Node Views.
(demo site)

(Shows example home page on the demo site)
On the right is a side bar created with blocks but the main region is a panel with different regions within it.

Use login redirect to send users to the Panels page rather than the ugly Admin page. They can see all their recent posts and posts that have been updated recently. etc. There is also a whole other page where you can control what node edit and taxonomy look like but we're not going to go there right now.

(Demonstrates how to use a panel to create a web page.)
Panels give you default layouts.
The issue here was that we wanted to create sites within a site for 30 different departments, each having their own home page. Individual department wanted their home page to look a little bit different from the other departments but still display some of the same information. Panels allowed us a quick way to create a customized look and feel.

From the Panels Admin Dashboard, you can add a variety of things into regions with drag and drop: Nodes, menus, custom code, blocks, views, widgets, or custom content.

(Demonstrate how to create Dashboard)
install panel
create a special node called a Panel
then you pick a layout
(goes through adding title, etc.)
Teaser field almost never gets used, except to show up in search
(clicks save)
now is system like any other node
Next step is to add content
Click on a region, which brings up a menu where you can pick what to put in the region (block, view (and each display associated with a view!), etc.)
(goes through the process of adding blocks to regions)
each one of the blocks can be styled based on the page that you're on.

(Demonstration, showing slideshow on the home page of pages.)
Views_slideshow to show things (adds another view type to a view). Nice JQuery effect.
Way you determine which web pages show up in the slide show is through node views.
(missing)
Use the promote capability to make pages show up in the home page slide show
select page
click add to queue
queue you can custom sort, it's a bucket of nodes

Huge node view fan. Allow your to define a view (instead of all node b author) add what nodes you want into a bucket.

Q: What was the controversy about Panels?
A: Performance, rendering of complex pages. The way to get around this is through panel caching. If you want to make custom blocks for Panels, you need to learn a custom set of skills.

Primary modules he uses:
Panels
Views
Node view
Image cache - upload once, use in multiple ways. Create content type called photo album, slideshow

Brian hasn't had a need to use Context yet but it sounds like you can do?

Another audience member:
Panels for main content area,
Context for blocks

What you want to expose to the end user is... contemplate, do the layout in the code rather than figure out, content template.

Content template, create a overides the default listing. Content template, allows you to do that right from your administration page, same as if you did it in the file system. Template gets stored in the database.


emptyvoid - Node Reference Presentation

:15 overview, the rest will be presented at the next (January) meeting

Node reference - 4 parts

1) Understanding content types
2) Using Views
3) Using Drupal theming, specifically using Theme and template files
4) (missed this one!)

It's not that you wouldn't have control with Panels and Context, but with Node Reference you can share content within pages and create an infinite number of layouts.

Strengths and weaknesses of node reference. The more visually oriented will find the nomenclature of Panels easier to understand where as the more advanced developer won't be as limited by using node reference.

Import and Export. Panels has import and export. You can export something as a module with a hook in it. You have to use the tools they provide or do a database dump.

Version control. Node reference is all in the source code. You can track changes since it's not in the database. You can't do this with modules like Panels that store info in the database.

Node refer or Node relationship modules, don't need to use them because through Views, go through Views on blog, Node relationship, see visually the relationship. Tools are already given to you, you know how to use them.

Node relationship. when creating a node, gives option not to link to a node if it's not there anymore. It remove those indexes out of the database when a node is deleted.