Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-11-19 21:35:46
- straumanis
- New Member
- Registered: 2010-11-19
- Posts: 3
List of published authors by section
How do I generate a list of authors who have published in a specific section, without having the author’s name repeat for every article?
Imagine if a site has 5 authors, some of whom have published in all sections, some of whom have published in just some sections and some, perhaps, who have not published at all. Is it possible to generate lists like this…
Section A
author1
author2
author3
Section B
author1
author3
author4
Section C
author1
author4
But author5 has not published anything and should not appear in a list until they do.
Offline
Re: List of published authors by section
I’ve never used it but I think this is the sort of thing you can use txp:if_different for.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: List of published authors by section
I think this does it…
<ul>
<txp:section_list>
<li>
<txp:section title="1"/>
<ul>
<txp:article_custom section='<txp:section />' sort="AuthorID">
<txp:if_different>
<li><!--<txp:section />--><txp:author/></li>
</txp:if_different>
</txp:article_custom>
</ul>
</li>
</txp:section_list>
</ul>
Strangly enough with out the hidden section name if_different made it only display the author name once on my site where I am the only author.
Last edited by MattD (2010-11-20 03:54:50)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#4 2010-11-20 02:25:21
- straumanis
- New Member
- Registered: 2010-11-19
- Posts: 3
Re: List of published authors by section
Thanks, but that just gave me a list of all sections. I need a list of authors published in each section.
Offline
Re: List of published authors by section
Really? It gives me a list of sections and authors. Like this
I was missing a closing ul
above and have edited it to correct this.
Last edited by MattD (2010-11-20 04:01:32)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#6 2010-11-20 04:20:48
- straumanis
- New Member
- Registered: 2010-11-19
- Posts: 3
Re: List of published authors by section
Perhaps the missing “ul” was it. Now it works. Thank you!
Offline
Pages: 1