Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] txp:images w/ auto_detect=article displaying ALL images ...
Hey there,
here’s what I was trying to do: use txp:images instead of txp:article_image to display multiple article images (specified as a comma-separated list in the article images field).
In my default article form I’ve got …
<txp:images form="articleImages" auto_detect="article" />
… with the form containing:
<img src='<txp:image_url thumbnail="1" />' alt='<txp:image_info type="alt" />' />
<figcaption itemprop="caption"><txp:image_info type="caption" /></figcaption>
Works like a charm for one or more entries in the article images field. However, when no image is specified, all my images are being displayed.
How would I stop this from happening??
Cheers,
-f
Last edited by funtoosh (2013-11-27 16:48:35)
Offline
Re: [SOLVED] txp:images w/ auto_detect=article displaying ALL images ...
Wrap it in an <txp:if_article_image/>
tag. That’s what I do.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: [SOLVED] txp:images w/ auto_detect=article displaying ALL images ...
Ah well, of course, that one does the trick.
Merci bien!
-f
Offline