Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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
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
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
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
Re: ordered articles list
jsoo wrote:
Have you considered using
<txp:variable>
? Initialize it to0
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
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
Re: ordered articles list
Cool thanks!
works great =)
Offline
Pages: 1