0

So currently if I make up a view that outputs three articles with their title and body fields a cleaned up version of the html structure would be:

<div class="item-1">
   <div class="title">Item One Title</div>
   <div class="body">Blah Blah Blah......</div>
</div>
   <div class="item-2">
   <div class="title">Item Two Title</div>
<div class="body">Blah Blah Blah......</div>
</div>
<div class="item-3">
   <div class="title">Item Three Title</div>
   <div class="body">Blah Blah Blah......</div>
</div>

Anyone know how I can, through Views or the best alternative, make the structure like this instead:

<div class="titles">
   <div class="title1">Item One Title</div>
   <div class="title2">Item Two Title</div>
   <div class="title3">Item Three Title</div>
</div>
<div class="bodies">
   <div class="body1">Blah Blah Blah......</div>
   <div class="body2">Blah Blah Blah......</div>
   <div class="body3">Blah Blah Blah......</div>
</div>

1 Answer 1

0

Look at Views Attachments. Set up your first View w/ just titles. Then Add display > Attachment, override your Fields to get body and use Attachment settings to position it after the first. Should be a few tutorials out there if this is confusing. Hope it helps.

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.