Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
link to first entry in a category
Hi, everyone. I’m experimenting with using Textpattern as the back end for a web comic. I’ve used an assortment of plugins to get the kind of navigation and display I’d like, but there’s one thing missing: an easy way to link to the first entry in a category.
Is there something based on manipulating the existing tags, or a plugin I haven’t found yet, that will let me do this? I could do it manually, but that’s tedious.
Last edited by Egypt Urnash (2006-07-23 06:26:45)
Offline
Re: link to first entry in a category
(ps: for any other Textpattern newbies who may happen across this, looking to do the same – this is my current default article form. Set a comic installment to an article’s article image, and leave the body blank; this will display it. Comics that are not the latest one will be a link to the next one. Uses some plugins, search textpattern.org for ‘em. This is a starting point, and probably needs work.
<code>
<h3><txp:link_to_prev>back</txp:link_to_prev>
<txp:permlink><txp:posted /></txp:permlink>
<txp:link_to_next>next</txp:link_to_next></h3>
<txp:swf_if_not_empty field=“article_image”>
<txp:chh_if_data>
<txp:link_to_next><txp:article_image /></txp:link_to_next>
<txp:else />
<txp:article_image />
</txp:chh_if_data>
</txp:swf_if_not_empty>
<txp:body />
<txp:comments_invite wraptag=“p” />
</code>
)
Offline
#3 2006-07-23 06:46:55
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: link to first entry in a category
…but there’s one thing missing: an easy way to link to the first entry in a category.
The “first” entry… do you mean the first in the list, with the default sort order? Makes a difference. Here’s what you’d do, if that’s what you mean:
<txp:article_custom category="my_category" limit="1" form="first_cat_article" />
form, first_cat_article
<txp:permlink><txp:title /></txp:permlink>
:)
Offline
Re: link to first entry in a category
I mean ‘first chronologically’, not ‘lowest dbref’. I’ll see if that works for me. (Still trying to get the hang of the various forms and sections.)
(also, praise goes here for your upn_img_popper, it’s one of the pieces in the puzzle for turning Textpattern into a reasonably streamlined comics-posting workflow.)
Offline
Re: link to first entry in a category
<code><txp:article_custom category=“my_category” limit=“1” sortdir=“asc” form=“first_cat_article” /></code> does what I’m looking for, thanks! Now to figure out how to iterate that over all the categories and bundle it in a list or popup.
And this also shows me how powerful the forms can be, as reusable little snippets of content or indirection. New possibilities.
Offline
Pages: 1