Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2007-02-16 02:39:30

makason
Member
From: Hilo, Hawaii
Registered: 2005-01-23
Posts: 34
Website

Re: wet_for_each_image: Lists images by employing user supplied markup

I have photos placed within the article text through a upm_image tag.

How would I use your plugin to view enlarged images through lightbox? I do not want to use image categories. Is it possible if I put the images also in the image article field?

Offline

#26 2007-02-16 05:18:15

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: wet_for_each_image: Lists images by employing user supplied markup

makason wrote:

Is it possible if I put the images also in the image article field?

Then you wouldn’t need wet_for_each_image at all, as upm_article_image plus a suitable form for it does all you need.

Offline

#27 2007-03-03 15:43:58

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

Re: wet_for_each_image: Lists images by employing user supplied markup

Hi Robert, have a small issue with this..

I have a left div with the following, which displays 2 images from a certain category:
<notextile><txp:wet_for_each_image category=“On-Tour” sort=“name asc” class=“right”>
<txp:upm_image form=“lightbox” image_id=”{id}” />
</txp:wet_for_each_image></notextile>

And in an article, I have this, which pulls out 2 images from another category:
<notextile><txp:wet_for_each_image category=“blabla” sort=“name asc”>
<txp:upm_image form=“lightbox” image_id=”{id}” />
</txp:wet_for_each_image></notextile>

It all works fine, except that when opening the image, all 4 images are there, rather than just the two I want. For example, if I click on the image in the left div, I want the 2 images there to display, if clicking on the image in the article, I would like only that category to display…

Hope it was clear!

Offline

#28 2007-03-03 17:29:50

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: wet_for_each_image: Lists images by employing user supplied markup

The form you named “lightbox” probably contains an <a> tag with an attribute like this: rel="lightbox[myset]". Lightbox treats all images with an identical rel attribute as part of one set which it then offers for browsing in one series.

You’ll have to modify your lightbox form to distinguish between images from separate categories one way or the other, for example by using two distinct lightbox forms differing in their rel attribute. See the original Lightbox documentation on examples how to handle more than one image set.

Last edited by wet (2007-03-03 17:30:50)

Offline

#29 2007-03-03 18:17:18

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

Re: wet_for_each_image: Lists images by employing user supplied markup

Thanks Robert that was very helpful. I did have rel=“lightbox[dings]” in the lightbox form. I created a new form, and altered the lightbox dings to lightbox dongs. Very creative ;-)

Thanks!

Offline

#30 2007-03-24 17:29:19

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: wet_for_each_image: Lists images by employing user supplied markup

Unless I’m mistaken, you can only use {id} once between opening and closing tags. Is there any way to reuse the {id} variable?

Offline

#31 2007-03-24 18:33:29

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: wet_for_each_image: Lists images by employing user supplied markup

{id} can occur multiple times inside a wet_for_each_image block. For instance, this works as intended:

<txp:wet_for_each_image category="people" wraptag="ul" break="li">
<txp:thumbnail id="{id}" /> -- image id is {id}
</txp:wet_for_each_image>

Please post a markup sample to help me understand your requirements.

Offline

#32 2007-03-24 19:38:53

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: wet_for_each_image: Lists images by employing user supplied markup

Thanks wet. This is an awesomely useful plugin. Problem solved.

Turns out it was a three way problem involving wondertag and urlvar.

But it’s fixed now, and as ever I’m delighted with this plugin.

Offline

#33 2008-09-15 06:47:29

azhou
New Member
From: Australia
Registered: 2008-08-10
Posts: 4
Website

Re: wet_for_each_image: Lists images by employing user supplied markup

Hey wet, just having a few problems with the offset function. My code looks like this:

<txp:asy_wondertag>

<txp:wet_for_each_image category=”<txp:custom1 />” offset=“1” >
<txp:upm_image image_id=”{id}” form=“lightbox” />
</txp:wet_for_each_image>

</txp:asy_wondertag>

But the offset doesn’t seem to have any effect (first image is still being displayed). Any ideas?

Offline

#34 2008-09-29 20:35:35

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: wet_for_each_image: Lists images by employing user supplied markup

Hello All,

I’m trying to define a parent category and have the plugin cycle through all the child cats. Is this possible and I’m just not seeing it? If not, anyone have ideas on how to make it possible?

Offline

#35 2008-10-14 05:46:55

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: wet_for_each_image: Lists images by employing user supplied markup

azhou, try v0.5.

Offline

#36 2008-10-14 06:18:32

azhou
New Member
From: Australia
Registered: 2008-08-10
Posts: 4
Website

Re: wet_for_each_image: Lists images by employing user supplied markup

That did the trick. Thanks heaps wet!!!

Offline

Board footer

Powered by FluxBB