Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-09 16:24:53

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

ordered articles list

Hey!
I will like to know how do I list articles with a number next to them? (just like in comments)
I got a custom article list of 3 articles and I need to ordered them from 1-3,
and use the code/tag of the numbers to place it where I want to in a form please?

Last edited by THE BLUE DRAGON (2009-08-10 07:14:47)

Offline

#2 2009-08-10 04:59:15

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: ordered articles list

If I’m understanding – you could use an ordered list and some css styling.

but if I’ve understood incorrectly – then you could look at rvm counter

Offline

#3 2009-08-10 06:59:27

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: ordered articles list

tye wrote:

If I’m understanding – you could use an ordered list and some css styling.

can’t use it, I need a tag/code to place the number where I want to and it will not be on the fly.
and with ‘ol’ list there is a dot after the number, I need just the number.

tye wrote:

but if I’ve understood incorrectly – then you could look at rvm counter

nice counter I will use it for something else, thanks ;)
but for now it’s not helping because it’s always change each time you refresh the page.
I need it to always stay as 1 2 3

Offline

#4 2009-08-10 14:38:05

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: ordered articles list

Have you considered using <txp:variable> ? Initialize it to 0 before the article tag, then increment it at the start of the article form.


Code is topiary

Offline

#5 2009-08-10 16:38:52

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: ordered articles list

jsoo wrote:

Have you considered using <txp:variable> ? Initialize it to 0 before the article tag, then increment it at the start of the article form.

ohh I don’t know how to use txp:variable, and don’t understand your instructions
can you please post an example code?
I don’t have any programing knowledge :(

Offline

#6 2009-08-10 17:56:22

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: ordered articles list

I’m away from my computer so hard for me to check this. I don’t think my first idea will work, because variable doesn’t allow you to do arithmetic operations. But adi_calc does.

Programming knowledge not needed. Start with <txp:variable name="counter" value="0" />, then use adi_calc to add 1 on each run through the article form.


Code is topiary

Offline

#7 2009-08-10 19:37:57

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: ordered articles list

Cool thanks!
works great =)

Offline

Board footer

Powered by FluxBB