Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-12 18:07:42

danwoodward
Member
From: Brooklyn NY
Registered: 2006-08-06
Posts: 51
Website

Article Numbering

I feel like this should be simple but I can’t figure it out.

I just want to number a list of articles. 1, 2, 3, 4 … Ultimately I’m trying to use the numbers as unique css IDs for each article. I know each article has a unique id but I need the list to always be in numerical order not dependent on the sort attribute.

I’ve tried using inline php in the article form to try to count the articles as they are rendered but I’m not fluent and can’t seem to find the right solution.

Anyone have any ideas.

Offline

#2 2009-05-12 18:49:07

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Article Numbering

If you only need a limited number of articles, I think it can be done with the variable and if_variable tags, but you’d still need quite a few tags. So maybe rvm_counter is a better solution.

Offline

#3 2009-05-12 18:53:33

danwoodward
Member
From: Brooklyn NY
Registered: 2006-08-06
Posts: 51
Website

Re: Article Numbering

Awesome! for my needs rvm_counter is perfect, thanks!

Offline

#4 2009-05-12 19:03:16

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Article Numbering

If you try rvm_counter, use this modified version.
The original one keeps the count on the server side, and the count is affected if a page gets two or more hits almost at the same time.

Even better, try adi_calc

Also, you may find a solution in this recent post


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2009-05-31 22:09:02

juliane
Member
Registered: 2009-02-08
Posts: 33

Re: Article Numbering

hi. is there a similar variable increment plugin for wordpress?

Offline

#6 2009-05-31 23:07:38

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Article Numbering

juliane wrote:

hi. is there a similar variable increment plugin for wordpress?

Try another forum?

Offline

Board footer

Powered by FluxBB