Hi all

I have a content type collecting data for jobs, general text fields and so on. I have a image field which can accept up to 10 images per job. How do I add a taxonomy field so I can reference these images from a view and display the images on a different, separate page based on the taxonomy tag. Is this possible?

I know I can add a separate taxonomy field to the content type, though how do I only add it to the image field itself?

Thanks,
Barry

Comments

nevets’s picture

You could use the field collection module, make a field collection of an image and taxonomy term.

computerbarry’s picture

Thanks nevets.

My first time using field collection. Before I download and give this a go, couple of questions:

  1. Is this the only way, not possible without downloading another/field collection module?
  2. By using the field collection, would that mean I would need to delete my existing image field in the content type and replace with field collection?

And do you use this module yourself?

Just want to get an understanding, cheers.

Barry

The more you learn.... the more you learn there is more to learn.

nevets’s picture

The only way to do what you want is to "group" the fields, the four methods I know of are

  1. Use other entity (for example content type) and an entity reference field. Requires another module if you want to be able to add/edit inline with the parent.
  2. Use the field collection module. This basically covers all three points above.
  3. Use the paragraph module. Similar to the field collection but more flexible, more than you need.
  4. Use the media module. It uses entities, so you could add a taxonomy term. While this has some strong benefits, I always seem to have issues getting it set up

Yes, you would need to delete you existing image field.

I have used the module myself, though not that often.

computerbarry’s picture

Thanks for the detailed information.

I'm going to give no.2 a try and see how it goes, will report back once everything is setup.

Barry

The more you learn.... the more you learn there is more to learn.

computerbarry’s picture

Ok, I now have a field collection, called Image collection.

Within this Image Collection I have:
- Job Photo (image)
- Taxonomy Photo (term reference)

Seems to work ok, letting me add multiple images and terms for each image.

What I don't understand is, the taxonomy part...

Example of taxonomy urls:

photo-gallery/fencing
photo-gallery/paving

But. Nothing shows on the pages besides a message:

There is currently no content classified with this term.

Any ideas what I'm doing wrong?
Do I need to setup something else for the taxonomy to work?

Thanks, Barry

The more you learn.... the more you learn there is more to learn.