Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Compare the value of two txp variables
I thought this would work
<txp:if_variable name="year" value="<txp:variable name="cyear" />">
but I keep getting
Tag error: <txp:if_variable> -> Textpattern Notice: variable_name_empty on line 4524
I thought I could find the answer looking around but I am coming up empty.
Offline
Re: Compare the value of two txp variables
Tags in Tags requires single quotes. Could that be the problem?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Compare the value of two txp variables
It always does help to actually read the directions.
And after a little bit more experimentation, I was able to reduce it down to one variable and one tag:
<txp:if_variable name="archiveyear" value='<txp:posted format="%y" />'>
Thanks.
Offline