Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-02-25 19:26:29

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

images tag and sort attribute problem

Has anyone had any problems using the sort attribute and the images tag?
Or am i doing something wrong?

This outputs a list of images in ascending order:

<txp:images category="cat1" form="essays" wraptag="ul" break=""   />

These output nothing – as in no rendered html:

<txp:images category="cat1" form="essays" wraptag="ul" break="" sort="asc"   />
<txp:images category="cat1" form="essays" wraptag="ul" break="" sort="desc"   />

Last edited by kvnmcwebn (2012-02-25 19:26:44)


its a bad hen that wont scratch itself.
photogallery

Offline

#2 2012-02-25 19:35:36

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,549
Website GitHub Twitter

Re: images tag and sort attribute problem

hi

try

<txp:images category="cat1" form="essays" wraptag="ul" break="" sort="id asc"   />

Offline

#3 2012-02-25 20:04:24

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: images tag and sort attribute problem

thanks that did it.


its a bad hen that wont scratch itself.
photogallery

Offline

#4 2012-02-25 20:34:43

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: images tag and sort attribute problem

Destry could you mention that in the tag reference? It’s misleading at the moment.


its a bad hen that wont scratch itself.
photogallery

Offline

#5 2012-02-25 21:11:34

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

Re: images tag and sort attribute problem

kvnmcwebn wrote:

Destry could you mention that in the tag reference? It’s misleading at the moment.

Hi Kevin, what is misleading in this?

Specify an image attribute from the ones below and add either asc or desc to sort in ascending or descending order, respectively.

Offline

#6 2012-02-25 21:17:28

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: images tag and sort attribute problem

I’ve put an example into the tag reference page for you, as suggested.

Offline

#7 2012-02-25 21:34:03

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: images tag and sort attribute problem

Hi Els, It only mentioned “asc” not “id asc” so it was confusing to me. Thanks phil i was just thinking for other people in the future.


its a bad hen that wont scratch itself.
photogallery

Offline

#8 2012-02-26 09:38:35

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,549
Website GitHub Twitter

Re: images tag and sort attribute problem

Hi Kevin you can order not only with id, but also with name, category, author, …

Offline

Board footer

Powered by FluxBB