Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-12 15:54:30

mlarino
Member
Registered: 2007-06-29
Posts: 367

Multiple images in article

Hi
I am creating a site where my client will post articles about restaurants etc… but they have no web knowledge.
I want to be able to keep the design consistent, so I am trying to find a way for them to upload images and place them allways in the same position on the page layout.
It would be great to have something like:
Image1:
Image2:
Image3:

Where they will type the ID of the image uploaded and that image will the be shown where ever I want in the website

Is there a plugin that can do something like this?
I was searching but cant find anything.

Thanks!

Offline

#2 2009-03-12 16:08:40

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Multiple images in article

Hi mlarino,

upm_image or smd_gallery.
upm_image is simpler, smd_gallery is the swiss knife of image galleries.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2009-03-12 16:29:18

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

Re: Multiple images in article

The article image field is probably the easiest place to store this. Get them to put a comma-separated list of image IDs in this field. If you want them to be able to upload images directly to the Write tab, try lam_image_uploader. Though I’m not sure if you can assign multiple images to the article image field using this plugin.

Once you have a list of images IDs you can do what maniqui suggests and probably use upm_image to show the first, second, third, whatever images in fixed locations in your template. I’m not sure how upm_image handles multiple images but if it can’t quite do what you want, smd_gallery can do it (at a push) by giving each gallery tag limit="1" and then adding offset="1" to your second gallery tag, offset="2" to your third gallery tag, and so on.

If upm_image (or even wet_for_each_image) has an offset capability, use that as it’s more efficient than using smd_gallery for single image display.

Last edited by Bloke (2009-03-12 16:30:19)


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

#4 2009-03-12 16:44:30

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: Multiple images in article

Thanks you both!!!
I think I can figure my way from here…

Bloke (still working on that restaurant page as you can see) will need your help when I am done for the filtering in the search! :)

Thanks again!

Offline

#5 2009-03-12 19:19:25

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Multiple images in article

Bloke wrote:

try lam_image_uploader. Though I’m not sure if you can assign multiple images to the article image field using this plugin.

Yes you can – at preference tab you can select which controls to show in upload box at wite tab. And you can even select, that every upload image’s id will append to article_image field ;)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#6 2009-03-12 19:43:16

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

Re: Multiple images in article

the_ghost wrote:

you can even select, that every upload image’s id will append to article_image field ;)

Rock on! Thanks for the confirmation. Very useful to know.


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

#7 2009-03-12 19:44:09

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: Multiple images in article

And you could also use custom fields to store images, and have them shown in different parts of the template…

Offline

#8 2009-03-24 12:35:59

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: Multiple images in article

Thanks for the help on this! it works perfect, I would rather have multiple image fields with a form each (a lot easier for the client to understand)
but this way with a little PDF tutorial I will make for them I am sure they wont have a problem.

Thanks again!

Offline

Board footer

Powered by FluxBB