First problem
Most of the posts from my EE blog have multiple authors. I’d like to create a list of authors, ordered by their last names, where the author names link back to the post they’ve authored. I have a set of custom fields for the authors’ first names and another set for their last names (i.e. author_A_firstname, author_A_lastname, author_B_firstname, author_B_lastname). Here’s my go at it (I put the conditionals in there to make sure that posts with just one type of author were pulled in, but I’m not really sure I need them).
<div>
<ul>
{exp:weblog:entries weblog="{my_weblog}" orderby="author_A_lastname&author;_B_lastname" sort="asc"}
{if author_A_firstname}
<li><a href="http://{url_title_path=">{author_A_firstname} {author_A_lastname}</a></li>
{/if}
{if author_B_firstname}
<li><a href="http://{url_title_path=">{author_B_firstname} {author_B_lastname}</a></li>
{/if}
{/exp:weblog:entries}
</ul>
</div>Out of that I get a list of authors linked correctly, but the list ordered by the date those posts were published, not alphabetically by the “author’s last name” custom fields… I’m aware of this thread, and a few others, but it hasn’t been any help. Thoughts?
Second problem
The step after this would actually be to create a set of links in case the author had multiple posts; if the author has only one post attributed to him link the name directly to that post, otherwise don’t link the name a create a list of numbers linked to those posts, i.e.
Jack Bender
Sarah Conner
Curtis Dover (1, 2)
John Franklin
Anna Sakura (1, 2, 3)
I think I want to do something like:
IF author_A_firstname AND author_A_lastname exist together ONCE create a link out of the name; ELSE IF author_A_firstname AND author_A_lastname exist together more than once write name and create a list of posts with the custom field author_A_firstname & author_A_lastname.
Any ideas on how to get started on that?