Grouping multiple nodes on a page

Events happening in the community are now at Drupal community events on www.drupal.org.
pnijjar's picture

I am working on a Secret Project and have a newbiesh Drupal 6 question.

We have three kinds of content (maybe determined by content type, maybe determined by taxonomy or something else). Let's call them "Intro", "Posts", and "Links". Each of these types of content has a tag.

I have a view that will pull all of the content with the same tag. I can sort this content by the content type, which gives me a list in the right order: first all of the Intro entries, then all of the Posts entries, then all of the Links entries. But this is a single list, which makes styling the different kinds of content differently difficult. I want to lay these different kinds of content out on the page and style them differently. However, I want to have the flexibility of omitting certain types: if there are no Posts for a page, then the users should see the "Intro" and "Links" section without embarrassing gaps or unneccessary headers in between.

My guess is that the Drupalish way of doing this is to use Panels (and somehow combine them with a View). Is this correct?

Are there other alternatives I should consider for this relatively simple case?

Some Drupal User Group members hate Panels because they are inefficient. Should I be worried?

I have also heard that Panels are hard to set up, but I guess I am going to see this for myself shortly.

I would appreciate any pointers or tips.

  • Paul

Comments

Group discussion

kbahey's picture

If Panels is needed only for this page, then it is overkill.

Seems like a simple way to do it is have a set of regions, and put blocks in them, one for each type, generated by views. Then to cover the "empty block" case, you can have block visibility code that hides the block (though I avoid this custom code for blocks on principle).

There used to be a views add on that can combine multiple views in one list, but I can't remember its name.

Either way, this sounds like a great case for group brainstorming at our meeting on Thursday.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

I figured out a solution I

pnijjar's picture

I found a solution I can live with: Views attachments. I make a page with Intro entries, and then add Views attachments for the other types. This is nice because I can specify different CSS classes for each of the attachments. I can also have better control over the fields I display for each type.

This is probably crazy inefficient, but I don't care for now.

Phew! Now I don't have to demonstrate at tomorrow's meeting!

Waterloo Region Drupal Users Group

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: