Skip to content

Instantly share code, notes, and snippets.

@hissy
Last active December 17, 2015 19:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hissy/5661358 to your computer and use it in GitHub Desktop.
Save hissy/5661358 to your computer and use it in GitHub Desktop.
[concrete5] Slideshow block template for Foundation Orbit slider (ignore individual fade duration, groupset, etc.)
<?php defined('C5_EXECUTE') or die("Access Denied.");
$h = Loader::helper('text');
?>
<ul data-orbit>
<?php
foreach($images as $imgInfo) {
$f = File::getByID($imgInfo['fID']);
$fp = new Permissions($f);
if ($fp->canViewFile()) {
$filename = $f->getFileName();
$filepath = $f->getRelativePath();
$url = $h->entities($imgInfo['url']);
?>
<li>
<?php if($url): ?><a href="<?php echo $url; ?>"><?php endif; ?>
<img src="<?php echo $filepath; ?>" />
<?php if($url): ?></a><?php endif; ?>
<div class="orbit-caption"><?php echo $filename; ?></div>
</li>
<?php
}
}
?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment