Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
only show the latest caption from a certain category
is there a way to only show the latest caption from a certain image category? i found one code snippet which was a combo of wet for each image and upm, and it didn’t work for me. but there has to be a way to do it with just one right?
Offline
#2 2009-12-03 16:59:35
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: only show the latest caption from a certain category
mrtunes wrote:
i found one code snippet which was a combo of wet for each image and upm, and it didn’t work for me.
I’m almost certain wet_for_each_image and upm_image can do that. What was the code that didn’t work?
Offline
Re: only show the latest caption from a certain category
here’s the code:
<txp:wet_for_each_image category="POTW_thisweek"> <txp:upm_img_caption /> </txp:wet_for_each_image>
Offline
#4 2009-12-03 17:38:22
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: only show the latest caption from a certain category
Does this work?
<txp:wet_for_each_image category="POTW_thisweek" sort="date desc" limit="1">
<txp:upm_image image_id="{id}">
<txp:upm_img_caption />
</txp:upm_image>
</txp:wet_for_each_image>
Offline
Re: only show the latest caption from a certain category
fantastic, thank you!
Offline