Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-01-02 11:25:37
- beechy
- Member
- Registered: 2006-03-02
- Posts: 92
Automatically list site authors and link to their articles
I want to output a list of all authors on my blog automatically.
i.e something like:
<ul>
<li><a href="/author/author+name+1">author name 1</a></li>
<li><a href="/author/author+name+2">author name 2</a></li>
<li><a href="/author/author+name+3">author name 3</a></li>
<li><a href="/author/author+name+4">author name 4</a></li>
</ul>
I’m sure this is pretty easy but at the moment I’m stumped.
Would I be able to do this with the:
<txp:article_custom /> and <txp:if_different> tags with just the <txp:author link="1"/> in the form? - if so how would I do it.
Thanks….
Last edited by beechy (2013-01-02 11:35:48)
Offline
Re: Automatically list site authors and link to their articles
beechy wrote:
Would I be able to do this with the:
<txp:article_custom /> and <txp:if_different> tags with just the <txp:author link=“1”/> in the form? – if so how would I do it.
Have you tried this?
<txp:article_custom sort="AuthorID">
<txp:if_different>
<txp:author link="1" />
</txp:if_different>
</txp:article_custom>
That’s not very fast if you have many articles and only few authors, a direct db query might be more effective.
Offline
#3 2013-01-07 16:49:47
- beechy
- Member
- Registered: 2006-03-02
- Posts: 92
Re: Automatically list site authors and link to their articles
Hi Oleg,
Excellent many thanks for that it was exactly what I was looking for.
Offline
#4 2013-01-29 13:08:54
- beechy
- Member
- Registered: 2006-03-02
- Posts: 92
Re: Automatically list site authors and link to their articles
Hi etc,
I’m using
<txp:article_custom sort="AuthorID">
<txp:if_different>
<txp:author link="1" />
</txp:if_different>
</txp:article_custom>
This outputs the author list 1 by 1 sorted Alpabetically. Is there any way of sorting the author list by the most recent articles they have posted.
I was hoping:
<txp:article_custom sort="AuthorID, Posted desc ">
<txp:if_different>
<txp:author link="1" />
</txp:if_different>
</txp:article_custom>
would do it but this doesn’t have any affect, the author list is still displayed Alpabetically.
If I use:
<txp:article_custom sort="Posted desc ">
<txp:if_different>
<txp:author link="1" />
</txp:if_different>
</txp:article_custom>
Multiple versions of the same author are displayed…
Last edited by beechy (2013-01-29 13:10:52)
Offline
Re: Automatically list site authors and link to their articles
Hi beechy,
without recurring to MySQL query, I have only this weird proposal right now:
<txp:article_custom sort="Posted desc ">
<txp:if_variable name='<txp:author title="0" />'>
<txp:hide>seen, do nothing</txp:hide>
<txp:else />
<txp:variable name='<txp:author title="0" />' value="1" />
<txp:author link="1" />
</txp:if_variable>
</txp:article_custom>
Last edited by etc (2013-01-29 13:47:47)
Offline
#6 2013-01-29 15:38:15
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: Automatically list site authors and link to their articles
You could try this ras_author_credits
Also, you may want to look at this Topic , it will do what you describe and a bit more.
Offline
#7 2013-01-29 16:02:44
- beechy
- Member
- Registered: 2006-03-02
- Posts: 92
Re: Automatically list site authors and link to their articles
Hi etc,
Thats awsome and works like a treat, thanks for all the help.
Offline