Skip to main content
fixed link
Source Link

Trying to add a hover overlay for node title and a couple of other fields for images using the views photos grid module.

The fields to be used in the overlay need be excluded from the display as the module only uses one image field, however I am not managing to add the excluded fields.

If I the preprocess to template.php

`function THEME_preprocess_views_photo_grid_style(&$vars) { $vars['raw_result'] = $vars['view']->style_plugin->rendered_fields;}`

$vars['raw_result'] = $vars['view']->style_plugin->rendered_fields; }`

I can print the titles using

`<code>`foreach`foreach ($raw_result as $row) {print $row['title']; }`

print $row['title']; }</code>

which prints the titles on the page outside the container as a row, but I can only add the last title to the overlay when trying to add the print statement within the div. Need to be able combine each title to each image that is shown using

div class="views-photo-grid-container">
$item): ?>
    <div class="views-photo-grid-item">
    <span class="overlay_test"><?php print $row['title']; ?></span>
  `foreach ($items <?phpas print$key $item;=> ?>
</div>$item):
 

print $item; endforeach;

Trying to add a hover overlay for node title and a couple of other fields for images using the views photos grid module.

The fields to be used in the overlay need be excluded from the display as the module only uses one image field, however I am not managing to add the excluded fields.

If I the preprocess to template.php

`function THEME_preprocess_views_photo_grid_style(&$vars) {

$vars['raw_result'] = $vars['view']->style_plugin->rendered_fields; }`

I can print the titles using

`<code>`foreach ($raw_result as $row) {

print $row['title']; }</code>

which prints the titles on the page outside the container as a row, but I can only add the last title to the overlay when trying to add the print statement within the div.

div class="views-photo-grid-container">
$item): ?>
    <div class="views-photo-grid-item">
    <span class="overlay_test"><?php print $row['title']; ?></span>
    <?php print $item; ?>
</div>
 

Trying to add a hover overlay for node title and a couple of other fields for images using the views photos grid module.

The fields to be used in the overlay need be excluded from the display as the module only uses one image field, however I am not managing to add the excluded fields.

If I the preprocess to template.php

`function THEME_preprocess_views_photo_grid_style(&$vars) { $vars['raw_result'] = $vars['view']->style_plugin->rendered_fields;}`

I can print the titles using

`foreach ($raw_result as $row) {print $row['title']; }`

which prints the titles on the page outside the container as a row, but I can only add the last title to the overlay. Need to be able combine each title to each image that is shown using

`foreach ($items as $key => $item):

print $item; endforeach;

fixed link
Source Link

Trying to add a hover overlay for node title and a couple of other fields for images using the views photos grid module: https://www.drupal.org/project/views_photo_gridviews photos grid module.

The fields to be used in the overlay need be excluded from the display as the module only uses one image field, however I am not managing to add the excluded fields.

If I the preprocess to template.php

`function THEME_preprocess_views_photo_grid_style(&$vars) {

$vars['raw_result'] = $vars['view']->style_plugin->rendered_fields; }`

I can print the titles using

`<code>`foreach ($raw_result as $row) {

print $row['title']; }</code>

which prints the titles on the page outside the container as a row, but I can only add the last title to the overlay when trying to add the print statement within the div.

div class="views-photo-grid-container">
$item): ?>
    <div class="views-photo-grid-item">
    <span class="overlay_test"><?php print $row['title']; ?></span>
    <?php print $item; ?>
</div>

Trying to add a hover overlay for node title and a couple of other fields for images using the views photos grid module: https://www.drupal.org/project/views_photo_grid.

The fields to be used in the overlay need be excluded from the display as the module only uses one image field, however I am not managing to add the excluded fields.

Trying to add a hover overlay for node title and a couple of other fields for images using the views photos grid module.

The fields to be used in the overlay need be excluded from the display as the module only uses one image field, however I am not managing to add the excluded fields.

If I the preprocess to template.php

`function THEME_preprocess_views_photo_grid_style(&$vars) {

$vars['raw_result'] = $vars['view']->style_plugin->rendered_fields; }`

I can print the titles using

`<code>`foreach ($raw_result as $row) {

print $row['title']; }</code>

which prints the titles on the page outside the container as a row, but I can only add the last title to the overlay when trying to add the print statement within the div.

div class="views-photo-grid-container">
$item): ?>
    <div class="views-photo-grid-item">
    <span class="overlay_test"><?php print $row['title']; ?></span>
    <?php print $item; ?>
</div>
Source Link

Mouseover overlay for images using Views Photo Grid

Trying to add a hover overlay for node title and a couple of other fields for images using the views photos grid module: https://www.drupal.org/project/views_photo_grid.

The fields to be used in the overlay need be excluded from the display as the module only uses one image field, however I am not managing to add the excluded fields.