Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
evaluate and default
I know I could use variables but this was just an experiment. The default
global has an odd behaviour when used in the context below returning 1
if the image’s alt
field has, or has not been filled. Is this expected?
<txp:images id="##">
<txp:evaluate test='<txp:image_info type="alt" />' default="alt text" />
</txp:images>
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: evaluate and default
colak wrote #325354:
Is this expected?
Actually, nothing is expected in this case, since <txp:evaluate />
expects either content or query
attribute to be provided. But we can tweak it to cover such situations too.
But why wouldn’t you use just
<txp:image_info type="alt" default="alt text" />
Offline
Re: evaluate and default
etc wrote #325357:
Actually, nothing is expected in this case, since
<txp:evaluate />
expects either content orquery
attribute to be provided. But we can tweak it to cover such situations too.But why wouldn’t you use just
<txp:image_info type="alt" default="alt text" />...
I could. This was just an experiment:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Pages: 1