djw_section_articles is a plugin for Textpattern providing for lists of articles out of a given section.
It was created by David Woodward. As David is no longer actively developing and supporting his plugin, we both have agreed that I would offer it on my site.
I have modified David’s code to accommodate some features I required and to make use of Textpattern core functions.
- List all articles in the current section
- Sort by title
- Label the list with the section’s title
<txp:djw_section_articles name="literature" c="mouse" sortby="Posted" sortdir="desc" label="Comic books" link="1" wraptag="ul" break="li" labeltag="h3" current="0" />
- List articles of category “mouse” in the “literature” section
- Sort by posting date descending
- Label the list with “Comic books”
- Let the label link to the section
- Render as an unordered list
- Tag the label with H3
- Suppress output of a link to the current article
See the plug-in help for a detailed attribute reference.
Mary proposed an elegant, plugin-less solution for listing articles contained in a Textpattern section which may fulfill your requirements as well by basically using
<txp:article /> on a page template with a custom article form containing a list item’s layout:
As a drawback, Mary’s method can only be used on article lists, not on single article pages. “djw_section_articles” on the other hand is context agnostic.
Licence and Disclaimer
This plugin is released under the Gnu General Public Licence.
Get it here: djw_section_articles.txt.
Resources and Relateds
Express your suggestions, report bugs and discuss enhancements in this thread in the Textpattern forum.