Skip to content

Instantly share code, notes, and snippets.

@fosturgh
Last active August 29, 2015 14:18
Show Gist options
  • Save fosturgh/0c5434aa769fac5318de to your computer and use it in GitHub Desktop.
Save fosturgh/0c5434aa769fac5318de to your computer and use it in GitHub Desktop.
<?php $banner_name = $this->getBannername() ;?>
<div class="single-item slider">
<?php $slide = 1; ?>
<?php $static_block = $banner_name . $slide; ?>
<?php while ( Mage::getModel('cms/block')->load($static_block)->getIsActive()) {
echo '<div>';
echo $this->getLayout()->createBlock('cms/block')->setBlockId($static_block)->toHtml();
echo '</div>';
$slide++;
$static_block = $banner_name . $slide;
}
?>
</div>
<?php $banner_name = $this->getBannername() ;?>
<div class="single-item slider">
<?php $slide = 1; ?>
<?php $static_block = $banner_name . $slide; ?>
<?php while ( Mage::getModel('cms/block')->load($static_block)->getIsActive()) {
echo '<div>';
echo $this->getLayout()->createBlock('cms/block')->setBlockId($static_block)->toHtml();
echo '</div>';
$slide++;
$static_block = $banner_name . $slide;
}
?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment