I have created a views with 2 fields added, "title" and "body" fields, hide them and output via "Global: Custom text" field. And I am trying to group them so that they can output like this, e.g.:
<div> <div class="title"> title 1 </div> <div class="title"> title 2 </div> <div class="title"> title 3 </div> </div> <div> <div class="body"> body 1 </div> <div class="body"> body 2 </div> <div class="body"> body 3 </div> </div>
However, no matter how I tweak, I couldn't find a way to do this and it always turn up like this, e.g.:
<div> <div class="title"> title 1 </div> <div class="body"> body 1 </div> </div> <div> <div class="title"> title 2 </div> <div class="body"> body 2 </div> </div> <div> <div class="title"> title 3 </div> <div class="body"> body 3 </div> </div>
Any idea how this can be done in Views?
Not sure what the best way to do this would be. I imagine that you might be able to do this with a custom template for the view.
OR.....
Create one view that just displays the title and another view that just displays the body. You can then add the body view to the title view as an attachment.
(I am not sure if this is the best solution, but it should work).