6

For the content region of my homepage (under Drupal 7) I have 3 columns in which I need to display 3 different content types:

  1. Regular article teasers (only image + summary as a link to full article)
  2. Daily quote/citation/message (article with a short citation)
  3. Advertising node (Advertising content type article)

Visually I have to respect the orderng of this layot (aren't designers wonderful):

===Column 1======Column 2=======Column 3=

=======Article=======Article=========Quote======= =======Article=======Article=========Article======= =======Advert=======Article=========Article======= =======Article=======Article=========Article======= =======Advert=======Article=========Article=======

I made a views block, which outputs a grid of a 3 columns and 5 rows filtering only articles "Promoted to the Frontpage". So far everything ok. Now following design decisions I'm trying to find a way to order the output of this view and particularily respect the positioning of the 2 Adverts elements, which will always be displayed in the 3rd and 5th row of the 1st Column. Same thing for the third column where the Quote element should always occupy the first postion on the 3rd column.

I'm a Views rookie so is there any Filter/Condition/etc that I'm missing and it would help me to achieve the required grid layout?

Thanks

===============================================

SOLUTIONS

After some research I found two methods to accomplish this that I'll go briefly in details in case other users come across the same needs as me.

  1. Using Node in Block module. In the Node in Block general Settings, I created 3 blocks and assigned the content types I want to list. The great thing about this module is that it gives the option to give friendly names to the blocks themselves but also to the Fieldset labels. Very user friendly for content editors who just want to click and select on labels that have a meaning and especially for languages other than English. In the render mode options there are a couple of options. For now, I chose the teaser but I have to check on how to further style or hack to accomplish the required look. I gave to content editor role, the permissions to manage the Node in Blocks queue and now they've got a nice list of the nodes assigned to the block(s) during the node creation. What I missed the first time I installed this module was that it exposes a Row Weight option. Now editors can nicely drag and drop the nodes in any order they see fit. For further positioning and styling I installed the BlockClass module and added a class to each block to individually style/position them.

  2. Another way to deal with this is to use Nodequeue module, create a queue list and add contents to it during node creation/modifications. Order the queue items as desired, then expose the contents of the Nodequeue list by creating a Views block with a grid output. At the moment the advantage of going through this compared to Node in Blocks, is that with Views every field can be assigned a class or the html output can be overridden, which would allow me to match 100% the required look. Since I'm not completely familiar with views and the workflow implications this will have for the editors, I'll just keep this in case the first scenario doesn't give me full styling liberty.

As always there are several ways to achieve things with Drupal, and that's what makes it exciting.

Tunox

  • Why dont you post it as an answer ? Please do so. – niksmac Mar 2 '13 at 14:58
1

There are three module (two that come with ctools) that you probably should be looking at. Page Manager, Views content panes, and Panels

Also, one of the best screen cast tutorials addressing views can be found here: http://dev.nodeone.se/en/list-group-content-with-page-manager

The focus is OG, but the way views is being used seems to directly apply to what you described.

  • Thanks for the hints @user908998. I'll be definitely looking into Panels soon, but since it requires a bit of a learning curve and I'm short of time for this project, I didn't want to add another layer of complexity on my actual mess :) In the meantime I found a working solution by using Nodes in Block. Awsome module! Since the comment field in this site has a limited char count, I'll explain the procedure further in the Answer option – Tunox Jun 10 '12 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.