Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Don't asy_wondertag and and wet_for_each_image work together?
Hi all, and a happy new year to all of you!
I am trying to build a custom gallery with asy_wondertag and wet_for_each_image but I only get a error.
Anybody know if they are compatible?
Briefly, I am collecting images with categories like “productNameScreenshots”. Then I created an article for each feature of the product between which there is an article “Screenshots” where I set a custom field screenshotsCategory
to the name of product’s screenshots like productNameScreenshots
. This way I am able to build a tabbed page in which a tab is dedicated to screenshots.
The article form that should manage this logic is:
<txp:body />
<txp:if_custom_field name="screenshotsCategory" >
<ul id="screenshots">
<txp:asy_wondertag>
<txp:wet_for_each_image category="<txp:custom_field name="productNameScreenshots" />" sort="name asc">
<li>
<txp:thumbnail id="{id}" />
</li>
</txp:wet_for_each_image>
</txp:asy_wondertag>
</ul>
</txp:if_custom_field>
What’s wrong with that code?
Thank you all in advance.
Offline
Re: Don't asy_wondertag and and wet_for_each_image work together?
I haven’t dived in your example, but asy_wondertag isn’t needed anymore on textpattern. Now tags in tags are core. Try removing the plugin.
Offline
Re: Don't asy_wondertag and and wet_for_each_image work together?
Unless you’re running quite an old version of Txp, asy_wondertag isn’t needed. You just need to use single quotes around a Txp tag that is the attribute value of another Txp tag:
<ul id="screenshots">
<txp:wet_for_each_image category='<txp:custom_field name="productNameScreenshots" />' sort="name asc">
<li>
<txp:thumbnail id="{id}" />
</li>
</txp:wet_for_each_image>
</ul>
If you’re running Txp 4.3.0, you can use the new images
tag:
<txp:images category='<txp:custom_field name="productNameScreenshots" />' sort="name asc" wraptag="ul" break="li">
<txp:thumbnail />
</txp:images>
Code not tested, but I think it will work.
Code is topiary
Offline
Re: Don't asy_wondertag and and wet_for_each_image work together?
Great, thank you all.
I didn’t know about tags in tags, thank again.
About TXP version, it’s still on 4.2.0 but knowing that, I would like to upgrade it.
OT:
Any issue with plugins or some “Upgrade guidelines” to read to avoid problems?
Offline
Re: Don't asy_wondertag and and wet_for_each_image work together?
caruso_g wrote:
Any issue with plugins or some “Upgrade guidelines” to read to avoid problems?
Code is topiary
Offline