Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#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
Re: Galleries linked to article
I would do it with article images. upm_file_popper and upm_image will get the job done.
Offline
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
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
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
Online
Pages: 1