I have a view to display latest 10 blog pages. 1. I have a title field 2. I have a author field

now I need to group all the titles in one div and all the author in another div.

But views results always have a nested result where respective node's title and author name are together in a same div. Is there any way to separate them?

  • You can write custom queries to achieve what you want. – harsh_behl_0007 Jan 9 '15 at 11:06

What about making two separate versions of the view: 1 page view with title fields and an attachement with author fields, or 1 page with titles, and the other a block with authors? So you first create a page view with a fields display. When adding fields, you select titles *and you make sure you set the field for "This page only".

enter image description here

Afterwards, on the top of the view, you select "add attachment"enter image description here. You will have an attachment versin of the view. In this, you add the "title" field. Again, make sure it's "for this attachment only". Now, go to "Attachment settings and select attach to page. enter image description here

  • The reason why I need two lists is that I have a plugin which on click of a title will display author name, so to execute this I need to structure the titles and author names in two different parent divs. Plus there are other similar functionality. – AnAnD Jan 9 '15 at 13:10
  • @AnAnD smells like jQuery to me.. – Wtower Jan 9 '15 at 13:13
  • is your structure like <div class="titles"> <p>title1</p> <p>title2</p> ... </div> <div class="authors"> <p>author1</p> <p>author2</p> ... </div> ? – Dalmaz Jan 9 '15 at 17:56
  • current structure is: <div class="row1"> <p>title1</p> <p>author1</p> </div> <div class="row2"> <p>title2</p> ... <p>author2</p> ... </div> – AnAnD Jan 12 '15 at 12:28
  • @Dalmaz I need it to be as you have mentioned above – AnAnD Jan 12 '15 at 12:28

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.