We have a content type Basic Page
that is supposed to be grouped by a taxonomy term field Page Type
that has the following values below in a view.
How can we setup the view so that the view will display the Page Type
in one group and the results in another group? Is this even possible without a hook_preprocess_hook()
or custom twig
template?
View Setup:
- Display: Block (`block_1')
- Format: Unformatted
- Format Setting: Grouping field nr. 1:
Page Type
,User rendered output to group rows = true
- Show: fields
- Show Settings: Inline fields -->
Page Type
- Fields:
Page Type
,Title
,field_description
- Filter Criteria:
Published = true
,Content type = Basic Page
- Sort Criteria:
Page Type (asc)
Page Type
Values:
- Blog
- Press Release
- Video
- Document
Current results:
<section class="views-content">
<div class="view-row">
<div> Blog </div>
<h3> Page Title1 </h3>
<div> Continually negotiate bleeding-edge materials through installed.</div>
</div>
<div class="view-row">
<div> Blog </div>
<h3> Page Title2 </h3>
<div> Collaboratively disseminate global customer service for..</div>
</div>
<div class="view-row">
<div> Blog </div>
<h3> Page Title3 </h3>
<div> Continually evolve enterprise-wide total linkage through..</div>
</div>
<div class="view-row">
<div> Press Release </div>
<h3> Page Title4 </h3>
<div> Energistically productize competitive sources after standards..</div>
</div>
<div class="view-row">
<div> Video </div>
<h3> Page Title5 </h3>
<div>Professionally implement principle-centered portals without efficient..</div>
</div>
<div class="view-row">
<div> Video </div>
<h3> Page Title6 </h3>
<div> Uniquely fabricate high-quality testing procedures with..</div>
</div>
</section>
Desired results:
<section class="views-content">
<div class="view-groups">
<div> Blog </div>
<div> Press Release </div>
<div> Video </div>
</div>
<div class="view-row">
<h3> Page Title1 </h3>
<div> Continually negotiate bleeding-edge materials through installed.</div>
</div>
<div class="view-row">
<h3> Page Title2 </h3>
<div> Collaboratively disseminate global customer service for..</div>
</div>
<div class="view-row">
<h3> Page Title3 </h3>
<div> Continually evolve enterprise-wide total linkage through..</div>
</div>
<div class="view-row">
<h3> Page Title4 </h3>
<div> Energistically productize competitive sources after standards..</div>
</div>
<div class="view-row">
<h3> Page Title5 </h3>
<div>Professionally implement principle-centered portals without efficient..</div>
</div>
<div class="view-row">
<h3> Page Title6 </h3>
<div> Uniquely fabricate high-quality testing procedures with..</div>
</div>
</section>