Hi all,
I’m a bit tired so I thought I’d throw this one out -
Is it possible to group entries by a Related Entry Field?
Basically I have the following structure -
Matting (Weblog)
Crain (Category)
Vinyl Tools (Related Entry)
Product (Entry)
and I want to output the following -
Vinyl Tools
Product 1
Product 2
Laminate Tools
Product 1
Product 2
My code at the moment is this -
<table class="table">
<tr>
<th></th>
<th>Title</th>
<th>Product SKU</th>
<th>Description</th>
<th>Offsite Link</th>
</tr>
{exp:weblog:entries weblog="{segment_1}"}
<tr>
<td class="{switch="resultRowOne|resultRowTwo"}">
{related_entries id="matting_photo"}<a href="http://{image_url}" class="thickbox">{thumb_url}</a>{/related_entries}</td>
<td class="{switch="resultRowOne|resultRowTwo"}"><a href="http://{path={segment_1}/product/}type/{categories}{category_url_title}{/categories}/{url_title}">{title}</a></td>
<td class="{switch="resultRowOne|resultRowTwo"}">{if matting_sku}{matting_sku}{/if}</td>
<td class="{switch="resultRowOne|resultRowTwo"}">{matting_description}</td>
<td class="{switch="resultRowOne|resultRowTwo"}">{if matting_link}<a href="http://{matting_link}?keepThis=true&TB_iframe=true&height=500&width=770" class="thickbox">Product Website</a>{/if}</td>
</tr>
{/exp:weblog:entries}
</table>