Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-23 06:24:44

Egypt Urnash
Archived Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

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

#2 2006-07-23 06:27:29

Egypt Urnash
Archived Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

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

#4 2006-07-23 07:15:37

Egypt Urnash
Archived Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

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

#5 2006-07-23 07:26:08

Egypt Urnash
Archived Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

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

Board footer

Powered by FluxBB