Hi,
I’m trying to create a 5 column, alphabetically split, list of the artists I’m creating in a weblog, but the logic escapes me. If it were split by A,B,C,D etc, it would be easier (and I’ve seen threads on that), but the logic escapes me on how to do this variant of it;
I want to split the list into 5 columns, A-E, F-J, K-O, P-U, V-Z, and be able to sort by firstname/surname - has anyone done something similar, or can help me with the logic/php behind it? Is it better to have one {exp:weblog:entries}, and loop in php, or use 5 custom queries?
Thanks,
{embed="embeds/above_content" location="artists" opt_page_title="Artists"}
<div id="artists-header">
<h1>Artists</h1>
Sort by <a href="http://?sort=firstname" class="list-sort">Firstname</a> or <a href="http://?sort=surname" class="list-sort">Surname</a>
</div>
<div class="artists">
<h4>A - E</h4>
<p> <ul><br />
{exp:weblog:entries weblog="artists" disable="categories|member_data|pagination|trackbacks" sort="asc" orderby="artist_firstname" }<br />
<li class="clearfix"><br />
<a href="#" class="more-info">more</a><br />
<a href="http://{url_title_path=artists/artist}" title="{artist_firstname} {artist_surname}" class="artist-listing">{artist_firstname} {artist_surname}</a></p>
<p> {reverse_related_entries id="artist" limit="1"}<br />
<div class="art"><br />
<div class="art-container"><a href="http://{url_title_path=gallery/art}">_ {exp:imgsizer:size image="{artwork}" width="180" height="110" alt="{title}"}</a><br />
</div><br />
</div><br />
{/reverse_related_entries}</p>
<p> </li><br />
{/exp:weblog:entries}<br />
</ul><br />
</div></p>
<p>{embed="embeds/below_content"}