Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[SOLVED] Simple variable question
Hi everybody!
I am curious why the code 1 and 2 below, set in an article list context with a published date in the future, output different values
1.
<txp:variable name="catalan_month" value="<txp:posted format='%b' / >" />
<txp:variable name="catalan_month" />
2.
<txp:posted format='%b' />
2. is correct.
1. outputs the actual month.
Why this?
Offline
Re: [SOLVED] Simple variable question
Sunfoot wrote #300730:
Hi everybody!
I am curious why the code 1 and 2 below, set in an article list context with a published date in the future, output different values
1....
2....
2. is correct.
1. outputs the actual month.Why this?
It should be
<txp:variable name="catalan_month" value='<txp:posted format="%b" />' />
Note the use of quotes.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] Simple variable question
Kalimera, Yannis!
Thanks!
I need glasses :-)
Felix
Offline
Re: [SOLVED] Simple variable question
Sunfoot wrote #300732:
Kalimera, Yannis!
Thanks!
I need glasses :-)
Felix
Hi Felex, is the problem solved?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] Simple variable question
Hi Yiannis
Yes, it is. Thanks to your help.
It was just an “orthographical” problem, as you mentioned.
Felix
Offline
Re: [SOLVED] Simple variable question
Just an fyi for those allergic to single quotes. This also works…
<txp:variable name="catalan_month"><txp:posted format="%b" / ></txp:variable>
Offline
Pages: 1