Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
TXP variable empty [Solved]
Sometimes variables are populated, sometimes not.
I encounter a problem with this:
<ul class="abs" id="choices"><txp:variable name="languages_counter" value="0" /><txp:section_list sort="name asc" break=""><txp:evaluate query='string-length("<txp:section />") < 3'>
<li role="option" tabindex="<txp:variable name="languages_counter" value='<txp:evaluate query=''<txp:variable name="languages_counter" /> + 1'' />' />" class="rel"><a aria-label="" href="<txp:site_url /><txp:section />"><txp:php>echo strtoupper(section(array()));</txp:php></a></li>
</txp:evaluate></txp:section_list>
</ul>
What I need here is an incrementation into the tabindex
but unfortunately they are empty.
Could you find where I fail while another sample by me works just fine (See here). Thanks.
Last edited by Pat64 (2019-09-30 17:34:50)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: TXP variable empty [Solved]
You don’t seem to output it, just incrementing its value. Try
<li role="option" tabindex="<txp:variable name="languages_counter" add output />" class="rel">...</li>
Offline
Re: TXP variable empty [Solved]
:D
As always: you’re a master, Oleg!
Thank you lot (have a good evening).
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: TXP variable empty [Solved]
Also, I would replace
<txp:php>echo strtoupper(section(array()));</txp:php>
with
<section escape="upper" />
Offline
Re: TXP variable empty [Solved]
:D
Each day, with you, we discover some magical and hidden things with this great CMS: Textpattern!
Thank you lot again, Oleg.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Offline
Pages: 1