SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/children_page_gallery.php

  1. <?php
  2. use Sprout\Helpers\Enc;
  3. use Sprout\Helpers\File;
  4. ?>
  5. <ul class="children-gallery-list children-gallery-list--<?php echo Enc::html($thumb_rows); ?>">
  6. <?php foreach ($page_node->children as $page): ?>
  7.  
  8. <?php
  9. if ($hide_blanks) {
  10. if (empty($page['gallery_thumb'])) continue;
  11. if (!File::exists($page['gallery_thumb'])) continue;
  12. }
  13. $mod = $idx++ % 4;
  14. ?>
  15.  
  16. <li class="children-gallery-list-item children-gallery-item-mod<?php echo Enc::html($mod); ?>">
  17. <a href="<?php echo Enc::html($page->getFriendlyUrl()); ?>" class="children-gallery-list-item-link">
  18. <?php if (!empty($page['gallery_thumb']) and File::exists($page['gallery_thumb'])): ?>
  19. <img src="<?php echo Enc::html(File::resizeUrl($page['gallery_thumb'], $image_resize)); ?>" class="children-gallery-list-item-image" alt="" role="presentation">
  20. <?php else: ?>
  21. <div class="children-gallery-list-item-image-placeholder"></div>
  22. <?php endif; ?>
  23. <p class="children-gallery-list-item-title"><?php echo Enc::html($page->getNavigationName()); ?></p>
  24. </a>
  25. </li>
  26. <?php endforeach; ?>
  27. </ul>
  28.