Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-02-15 20:42:58

roelof
Member
Registered: 2005-03-27
Posts: 647

How can I find the last value of a custom field of a month ?

Hello,

For debugging a script I need see the value of some variables <txp:variable name=“totpages” /> I’m using.
Can this be done and how ?

Roelof

Last edited by roelof (2010-02-15 21:08:06)

Offline

#2 2010-02-15 20:59:48

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: How can I find the last value of a custom field of a month ?

<txp:php> global $variable; dmp( $variable[‘totpages’] ); </txp:php> should return the value currently placed in that array element, given you have set a value to that name.

Last edited by rsilletti (2010-02-15 21:00:39)

Offline

#3 2010-02-15 21:01:30

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: How can I find the last value of a custom field of a month ?

Oke,

Thank you.

Roelof

Offline

#4 2010-02-15 21:04:03

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: How can I find the last value of a custom field of a month ?

hello,

I try to write a script whick dislays the last value of a custom field of a month.
I now see that the script is not working.
So i have to rethink everything.

Roelof

Offline

#5 2010-02-15 21:33:18

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

Re: How can I find the last value of a custom field of a month ?

Is this what you are trying to do?

<txp:variable name="totpages" value='<txp:article_custom category=''<txp:category />'' month=''<txp:page_url type="month" />'' sort="Posted desc" limit="1"><txp:custom_field name="pagenr" /></txp:article_custom>' />

Note the sort=“Posted desc.

Offline

#6 2010-02-16 06:44:36

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: How can I find the last value of a custom field of a month ?

Hello Els.

You are a angel.

Roelof

Offline

Board footer

Powered by FluxBB