T
T
Tlito2015-06-30 10:37:06
Drupal
Tlito, 2015-06-30 10:37:06

Set field formatter to be user selectable rather than once set in the Display Manager?

There are materials of type Photos with a multiple field of type Image. This material can be loaded with:
1. photo portfolio
2. photos or promo pictures of promotions
The first view should be displayed in GalleryFormatter or CollageFormatter for more convenient viewing, since there are usually a lot of them.
And the second type should be displayed simply with pictures as they are in their original size, since there are texts in the pictures and you need to view them all at once without clicks, without zooming ....
Tell me how can I display such materials like Photo Gallery in different formats depending on value set by the user in the "Display format" field?
That is, the user can choose: display: simple photos, gallery 1, gallery 2.
I implemented a similar but simpler Image Style Switcher (ISS) where the user can choose the size of the blog image. Now the task is more difficult and probably you need to write your own module, tell me the direction, at least.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
holyorb2, 2015-07-01
@holyorb2

Make a PHOTO TYPE field for your material type and, depending on the type, output either one formatter or another. I would write my custom module, work for 1 hour.
Often I use the checkboxes that go in the node itself: "attach on top" or "show on the main" and redefine them to the value I need. It's much easier to select from a single node table than to join fields.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question