Jump to content

Images Field (associate URL with each image)


renobird
 Share

Recommended Posts

I have an images field, and each image needs to have an external URL associated with it.

Currently I'm having the client add the URL in the description field, but that feels a bit clumsy.

How do you all address this? Is there some other simple method that I'm just too dense to see today?

Link to comment
Share on other sites

Image/file fields aren't extendable by default, but you can create new extended image field. And repeater is of course one possibility... but if you don't need description field for anything else, then I think it is just fine to use it for the url.

  • Like 1
Link to comment
Share on other sites

Hi Antti,

Thanks. They have dozens of "sponsor logos", and they change enough that the idea is to manage them locally and then upload a zip file.

I'm not sure a repeater would work in that case. I don't need the description field for this — so it works — but I don't like the idea of having to use a mislabeled field.

It just doesn't feel very Processwire like.

;)

Link to comment
Share on other sites

You can make a custom module for this. Just copy the image inputField and change the label. Or even better, leave the description for the alt, and add the url field to it.

You could also change the label with Language Support.

  • Like 1
Link to comment
Share on other sites

Could you not use pages? FWIW I'm starting to do this kind of thing more often - create a template with the fields you need but don't make a template file. Then you can use PW's selectors (with eg template=logo). We don't use 'leverage' for 'use' in the UK but you know what I mean. :)

Link to comment
Share on other sites

That could also work, but then I would loose visual drag/drop to sort.

Sure, they could still reorder the pages, but that is a lot more tedious than just moving images around in an image field.

:)

P.S. I like where your head is at though, Dave.

And, look at all the way things can be done with PW — so killer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...