0

I'm using Drupal 7 and below you can see an example of what I want to achieve. Basically I have a specific content type that I want to display as seen in the image.

On the left I want to list some fields of my content type and on the right some content elements. Basically it's a horizontal table. Also I would like to be able to format each row individually.

I already know that I could do it with the Panels module by creating a variant in the Node Page with a selection rule for my content type and by then adding the nodes manually to a Panel Page.

But that doesn't feel like the most elegant solution. Isn't there a possibility to arrange the content in a view as I want to do it? What approaches would you suggest me?

horizontally arranged content

2 Answers 2

1

Do you really care to have tables in the semantic meaning of it? I mean, you can just print your fields to divs and use float: left for the 3 content elements and for the labels print it manually on a div on the header.

Might not be the most elegant solution but will work and be easier than making it with panels...

The best way to do it would be to print First Field: Label | Line 1 | Line 2 | Line 3 Second Field: Label | Line 1 | Line 2 | Line 3 But that's not how Views works.

You could also retrieve all the information in a custom module and then manage it however you want. But then, you wouldn't need to use Views module...

1

If these nodes are also going to be viewed as full pages else where then you could use a the teaser view mode, a simple view and some CSS.

  • Create a new view of display format teaser.
  • Filter to return these nodes by their nid's.
  • Use CSS to display:inline-block on the .node or <article>
  • Configure the fields you want in the teaser view mode setting in manage display for this node type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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