Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-19 06:45:28

deFUNKT
New Member
Registered: 2008-02-19
Posts: 3

Galleries linked to article

How would I add an optional image gallery to a page? For instance you have a product section and each product page can optionally have an undefined number of images connected to it.

I like the idea of people uploading the images and putting the right category on them. The plugins I found however, seemed to require that the category name included the id, which might be a bit more cumbersome for users than using the page title.

Another thing I thought about was using the unlimited custom fields plugin, adding fields for the images.

Any (better) tips?

Offline

#2 2008-02-19 07:18:58

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Galleries linked to article

I would do it with article images. upm_file_popper and upm_image will get the job done.

Offline

#3 2008-02-19 07:19:33

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

Re: Galleries linked to article

Hi

Why not using txp:article_image for what you want? you can add multiple images separated bu comma, and then use, for example upm_image tu display them, and if theres is no images you can test that by using chh_if_data!

Cheers

Offline

#4 2008-02-19 07:26:02

deFUNKT
New Member
Registered: 2008-02-19
Posts: 3

Re: Galleries linked to article

Adding the images to the article is done by adding the ID, right? (new to textpattern, sorry)

I fear that it might be a bit a bit too difficult for a client to do an update that way. What do you think? Do you have experience with clients using it?

Offline

#5 2008-02-19 07:47:33

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Galleries linked to article

there are plugins that automate the id-adding for you. upm_image_popper, bas_img_selector, lam_image_uploader, stm_image_uploader etc etc

Offline

#6 2008-02-19 07:50:40

deFUNKT
New Member
Registered: 2008-02-19
Posts: 3

Re: Galleries linked to article

Thanks for all the info I’ll look into those

Offline

#7 2008-02-19 09:05:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,449
Website GitHub

Re: Galleries linked to article

If none of those fit your needs, you could try the smd_gallery plugin (even though it’s beta it’s plenty stable enough for what you want)

Use a custom field to list the image categories you want to display in that article’s gallery and use:

<txp:if_custom_field name="img_gallery">
  <txp:smd_gallery category="?img_gallery" form="my_gallery" />
</txp:if_custom_field>

The my_gallery form then displays the thumbs or the fullsize images or lightboxes the pics or whatever you want.

You or your clients are then free to create image categories and assign them arbitrarily (even multiple categories separated by comma) to an article using the img_gallery custom field. Every time an image is uploaded to a category, the image automatically gets added to the gallery. How’s that?

Edited to add: although it’s probably not a good idea you could use the article_image field if you like to list your desired image categories. Just use ?article_image instead of ?img_gallery. Since your gallery is optional, you might find the lack of if_article_image hampers your progress though.

Last edited by Bloke (2008-02-19 09:54:50)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB