Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-27 09:26:00

skualito
Member
Registered: 2010-10-14
Posts: 24

[solved] Use a form to output a list of images

Hi all,

I’m confused! I’m trying to use the core images tags to diplay some pictures via galleria.js. I made a section “gallery” for my testings, and I post the following article in it:


<txp:images category="test" class="galleria" wraptag="ul" break="li" >
<txp:image_url><txp:thumbnail /></txp:image_url>
</txp:images>
<script type="text/javascript">
    // Load the classic theme
    Galleria.loadTheme('<txp:site_url/>js/themes/classic/galleria.classic.js');
    // Initialize Galleria
    $('.galleria').galleria({
height:500});
</script>

which works fine! But I’m getting problems when I try to make a form to make it easier to send the pictures of choice to galleria. I tried different combinations, but I’m having a hard time to figure out how to do. I tried using <txp:images form="my_galleria" category="test" /> and the other part of the code in a form, but it results in each picture launching the galleria script.
Hmm, any advice on this?

Last edited by skualito (2011-01-27 11:07:27)

Offline

#2 2011-01-27 10:00:24

skualito
Member
Registered: 2010-10-14
Posts: 24

Re: [solved] Use a form to output a list of images

Well, i progressed a bit with the logic: the calls to galleria are now in the gallery page template.
So I just need this in my article:

<txp:images category="test" class="galleria" wraptag="ul" break="li">
<txp:image_url><txp:thumbnail /></txp:image_url>
</txp:images>

Still, is there a way to make this simpler?

Last edited by skualito (2011-01-27 10:04:36)

Offline

#3 2011-01-27 10:52:25

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: [solved] Use a form to output a list of images

You could just make this part of your article

<txp:images category="test" class="galleria" wraptag="ul" break="li" form="galleriathumb" />

and then create the ‘galleriathumb’ form

<txp:image_url><txp:thumbnail /></txp:image_url>

Is that what you mean?

Offline

#4 2011-01-27 11:07:02

skualito
Member
Registered: 2010-10-14
Posts: 24

Re: [solved] Use a form to output a list of images

Damn! I was looking far away, I feel a bit ashamed not having found out this myself.
Thanks Tye.

Offline

#5 2011-01-27 11:14:08

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: [solved] Use a form to output a list of images

no worries :)

Offline

Board footer

Powered by FluxBB