Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-09 17:13:24

caruso_g
Member
From: Catania
Registered: 2009-04-11
Posts: 88
Website

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

#2 2011-01-09 17:18:14

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

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

#3 2011-01-09 17:22:08

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#4 2011-01-09 17:31:00

caruso_g
Member
From: Catania
Registered: 2009-04-11
Posts: 88
Website

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

#5 2011-01-09 17:40:53

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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?

Plugins broken/redundant in 4.3.0


Code is topiary

Offline

Board footer

Powered by FluxBB