Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-12-03 04:33:35

ploinkr
Member
From: Montreal
Registered: 2007-12-06
Posts: 83

<txp:image category="x" limit="x" />

Hi, is there a way to achieve that? Seems like basic stuff that should be bult-in but I’ve been scratching my head for a good hour, looking at plugins & such, trying to find the simplest / leanest way to do it.
Any advice? Thanks in advance,
B.

Offline

#2 2009-12-03 06:46:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,249
Website GitHub Mastodon Twitter

Re: <txp:image category="x" limit="x" />

Hi Benoit, I’m not sure as to what exactly you are trying to achieve.

Would the category tag help? <txp:category type="image" />. There is no limit attribute to it though. Alternatively you could use the excellent smd_gallery plugin which would provide you with all the options you need.

Last edited by colak (2009-12-03 06:48:02)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-12-03 07:57:54

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: <txp:image category="x" limit="x" />

image_index, but it will give you only the thumbnails. Have a look at wet_for_each_image.

Offline

#4 2009-12-03 13:19:40

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: <txp:image category="x" limit="x" />

As colak, I would suggest you to use the superb smd_gallery. Any “built-in” method (if exists) is probably far less flexible than anything you could achieve with smd_gallery.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2009-12-03 14:22:39

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: <txp:image category="x" limit="x" />

This tip may help, as it uses wet_for_each_image that Els alluded to and is category based. Although it uses Galleriffic, you could adapt it quite easily to your needs.

Offline

#6 2009-12-03 15:56:42

ploinkr
Member
From: Montreal
Registered: 2007-12-06
Posts: 83

Re: <txp:image category="x" limit="x" />

Thank you all for the replies! – will take a look at your suggestions.

Would the category tag help? <txp:category type=“image” />.

Thanks colak; looks like I’ve been thinking about it backwards ;-P
Too bad about the limit attribute not working, though.

––––

Yay! Got it to work with wet_for_each_image:

<txp:wet_for_each_image category="<txp:custom_field name="img_category" />" limit="2" /><txp:image id="{id}" /></txp:wet_for_each_image>

Thanks, everyone :-)

Last edited by ploinkr (2009-12-03 16:16:53)

Offline

Board footer

Powered by FluxBB