N
N
Nikita Danilov2016-06-10 18:31:31
Drupal
Nikita Danilov, 2016-06-10 18:31:31

How to display the main node image in Fancybox?

Good afternoon!
There is a Drupal 7.3 site that displays products, for example http://vinokuram.ru/moonshine-machine-katyusha-hatch... The node has a main picture and secondary pictures (below).
According to the specification, it is required that fancyBox works not only on the images below, but also on the "main" image of the node. In the admin panel, the "Product" material type was created with the standard "Image" field (fancybox field format), but tinkering with its settings still does not allow the first image that is loaded when creating a node to also get a fancibox. Acquired only with the second.
Where there is no Fansibox, there is html like this:

<div class="cell field-image-large">
<img typeof="foaf:Image" src="http://vinokuram.ru/sites/default/files/styles/250x350/public/image.jpg?itok=jV8DYWYc" alt="" height="350" width="250">
</div>

Where is FB:
<a
href="http://vinokuram.ru/sites/default/files/big_image.jpg" title="Самогонный аппарат «Катюша Люкс» 17л с сухопарником" class="fancybox" data-fancybox-group="gallery-post-389"><img typeof="foaf:Image" src="http://vinokuram.ru/sites/default/files/styles/190x140/public/image.jpg?itok=BbdaDv_3" alt="" title="" height="140" width="190"></a>

Fansybox settings did not help me. I also did not find anything good in the site template, on the topic "why there is no FB for the main picture". Which direction to look? Perhaps some kind of hack is needed here?
PS. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Kolesnichenko, 2016-06-10
@Negatiff

I'm not sure that I understood correctly, but if I understood it, then it can be configured here:
Structure - Material types - Material type name - Edit - Display control - Opposite the desired field, in the "Format" column, put Fancybox

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question