Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-06-29 19:51:21

progre55
Member
Registered: 2006-05-02
Posts: 668

Image Handling: Image Category

I am hoping there is an easy answer for this issue:

I have a page with the following inside of it:

<txp:article form="Form A" />

Inside of Form A I have the following text:

<txp:wet_for_each_image category="home" sort="date asc"> <txp:upm_image form="thickbox" image_id="{id}" /> </txp:wet_for_each_image>

Inside the thickbox form, is the following text:

<a class="thickbox" rel="" href="<txp:upm_img_full_url />" title="<txp:upm_img_alt escape="html" />"> <img src="<txp:upm_img_thumb_url />" width="65" height="65" alt="<txp:upm_img_alt escape="html" />" /></a>

All works as expected, EXCEPT

Rather than hardcoding the image category, I want it to dynamically pull from another source (ie custom field) …

Any and all suggestions would be appreciated.

Thanks.

progre55

Last edited by progre55 (2007-06-29 19:53:42)

Offline

#2 2007-06-30 16:41:25

jordi
Member
From: Barcelona
Registered: 2005-09-14
Posts: 94
Website

Re: Image Handling: Image Category

I’m not sure if this would work, but you could try the asy_wondertag plugin (tags within tags), perhaps you can get away with something like: <txp:wet_for_each_image category=”<txp:custom_field name =“XX” />” sort=“date asc” > …etc.

Last edited by jordi (2007-06-30 16:45:03)

Offline

#3 2007-07-02 21:26:15

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Image Handling: Image Category

jordi:

Thanks for the suggestion. worked like a charm.

The new code is:

<txp:asy_wondertag><txp:wet_for_each_image category="<txp:custom_field name="Image Category" />" sort="date asc"> <txp:upm_image form="thickbox" image_id="{id}" /> </txp:wet_for_each_image></txp:asy_wondertag>

progre55

Offline

Board footer

Powered by FluxBB