I tried everything in this thread https://drupal.org/node/1536098 and the issue still persists. My theme is Corolla and whatever I do for the past 3 days (removing 'width' parameter and setting it in CSS as .galleria-container {width: auto;} ),it just does not work!

Comments

kingswoodute’s picture

Try

  • Downloading the latest version of the library
  • Changing the default optionset so that the only option is height 0.66666666666667

I'm using version 7.x-1.0-beta3

It works great and resizes dynamically. Hope this helps.

drupalina’s picture

I have found out that the Galleria stops working when you set the width to "auto" and if you have a custom template like node--article.tpl.php

In that template I do the following:
At the top I print
<?php hide($content['field_images']); ?>

In teaser I show only the first image and so I print

<?php if ($page == 0): ?>
<?php print render($content['field_images'][0]);  ?>
<?php endif; ?>

and in the full node I print

<?php if ($page != 0): ?>
<div class="galleria"><?php print render($content['field_images']); ?></div>
<?php endif; ?>

If you don't have a custom node--content-type.tpl.php then setting width to "auto" works and Galleriais responsive. But if you have a custom node--content-type.tpl.php and set the images using the above codes, then Galleria doesn't display at all.

Can anyone help? How to correctly print render the galleria in a custom node--content-type.tpl.php???

drupalina’s picture

Ok, I got it to work just by adding [0] for the full node display:

<?php if ($page != 0): ?>
<div class="galleria"><?php print render($content['field_images'][0]); ?></div>
<?php endif; ?>
drupalina’s picture

Status: Active » Closed (works as designed)

closing the issue