1

I am testing Craft to see if it would be a good fit for sites I build. At this point, I do feel it is great and might fit most of the work I do. The only thing I can't figure out is how I could add a url to images to build a logo gallery (ie: list of logos that link to the partners websites).

Is there a way to do this by default? I can't find any information on it.

1
  • Hey Eric - Are the images listed in an entry field somewhere? Apr 10 '15 at 14:43
4

You can add any number of fields to your asset sources (just like you can for 'user groups', 'category groups', 'tag groups', or 'entry types'). Under 'settings > assets > sources', click a source (or create new); then click the 'field layout' tab and add your field (field needs to be created first); and save. For a url you would likely just use a textfield.

In your template you would access it with something like this:

{{ entry.myAssetsFieldHandle.first().myLinkUrlFieldHandle }}
1
  • Thank you. I totally missed the fact that you can set fields on Asset types. This makes it very flexible. Apr 10 '15 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.