Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-09-28 07:35:27

lie2815
New Member
Registered: 2012-04-24
Posts: 3

Create a simple gallery for every product

I have a special content section for my products. It displays the single picture selected as “article image” on the page.

However, I would like to have a simple gallery with more images of that product (in a lightbox, if possible) pop up when I click on that image.

I am sure there is a plugin that allows for things like this? What is the best way to do this if not?

Thanks in advance.

Offline

#2 2012-09-28 08:14:03

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

Re: Create a simple gallery for every product

Hi

you dont need a plugin for that purpose.

put the images in the article_image field directly with comme separator, txp:article_image show you only the first image for showing all the images use this code in an txp:article tag or txp:article_custom tag:

<txp:images break="">
<txp:thumbnail link="1" class="yourclass" />
</txp:images>

That gives you a linked thumbnail and it s up to you to use a javascript lightbox code.

Cheers

Offline

#3 2012-09-28 16:51:27

lie2815
New Member
Registered: 2012-04-24
Posts: 3

Re: Create a simple gallery for every product

Thank you, Sir! :)

That helps a lot.

About the lightbox: how would I add the lightbox code? I don’t need help with the code, but just a general idea how I can build that into (?) the tag…

Offline

#4 2012-09-28 18:05:56

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Create a simple gallery for every product

Find a lightbox js implementation you like, build your html output in Textpattern to what it requires. Follow the lightbox’s instructions for the rest.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB