Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-05-13 10:50:48

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

images and smd_gallery sublevel="all"

Is there a way to have similar functionality to <txp:smd_gallery category="events" sublevel="all" limit="1" sort="random" /> using native tags? It seems that the only non-native function I am using in the smd plugin is the detection of category sublevels.


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

Offline

#2 2012-05-13 11:49:50

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

Re: images and smd_gallery sublevel="all"

Hi Yiannis

is this code works:

<txp:images category='<txp:category_list parent="events" break=","><txp:category /></txp:category_list>' sort="rand()" limit="1"><txp:image /></txp:images>

Offline

#3 2012-05-13 12:12:04

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

Re: images and smd_gallery sublevel="all"

Thanks Rabah, This seems that it will work just fine.


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

Offline

#4 2012-05-13 13:42:12

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

Re: images and smd_gallery sublevel="all"

No… :( Looking at it again it is parsing article sub-categories and not image sub-categories which is what I need :(

Maybe this will work

<txp:images category='<txp:category_list type="image" parent="events" break=",">
<txp:category type="image" />
</txp:category_list>' sort="rand()" limit="1">
<txp:image />
</txp:images>

Last edited by colak (2012-05-13 13:44:22)


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

Offline

#5 2012-05-13 14:31:14

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

Re: images and smd_gallery sublevel="all"

Ah sorry a forgot about type=“image”

Offline

Board footer

Powered by FluxBB