Answer the question
In order to leave comments, you need to log in
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>
<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>
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question