Categories:
Author:
Current version:
0.2
About It:
Get it:
Rate it:
Flag it:
jra_link_to_next & jra_link_to_prev
These 2 article tags are replacements for link_to_next and link_to_prev which offer additional section and sort attributes to better reflect the position in the list.
Optional attributes are:
- section, which limits the list to the section;
- showalways, default to 0, like the txp attribute. When 0, the enclosed contents is not shown if there is no link (beginning and end of list). When 1, the contents is shown even if there’s no link. (thanks for commentors for pointing at it missing). Added v0.2.
- sort, a SQL string which controls the ordering of the list.
The latter was my motivation for this plugin. For example, in a list defined as follows:
<txp:article section='listings' limit="6" sort="custom_7,LastMod desc"/>
once you open an article, what is prev and next?
In this case, it’s this:
<txp:jra_link_to_prev
sort="custom_7,LastMod desc"
section='listings'>[<< Prev]</txp:jra_link_to_prev>
and this:
<txp:jra_link_to_next
sort="custom_7,LastMod desc"
section='listings'>[Next >>]</txp:jra_link_to_next>
Posted here:
02 Nov 2007Article modified:
12 Nov 2007









If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:
Commented (4)
Beautiful. Installs in seconds and works as advertised. Thanks.
When I use or with this plugin, it works fine except when it’s the first or last item. The link works, but the text that would be called by these native TXP tags does not appear. Again, this only accurs with the first or last article.
Sorry, the commenting form did not display the TXP tags; I was referring to prev_title and next_title.
Kevin, thanks for the feedback. Ted, thanks for pointing at the missing bit. The txp tags offer a showalways=‘1’ attribute to handle that, so I’ve added it in v0.2.
Subscribe to this article's comments RSS feed. [ ? ] View Recent Comments across the site. Get a Gravatar.