0

I would like to output all Images except 'base image' and 'small image' for an image Slider. Right now this code below outputs all Images:

    <?php
    $_product = $this->getProduct();
    $_helper = $this->helper('catalog/output');
?>
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>

    <div class="row slider clearfix">
        <div class="column full slide ratio4_3">

        <ul class="bxslider product">
            <?php foreach ($this->getGalleryImages() as $_image): ?>
                <li>
                  <div class="sliderContent">
                  </div>
                  <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile()); ?>" class="sliderImage" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" />
                </li>
            <?php endforeach; ?>
        </ul>

      </div>
    </div>

<?php endif; ?>

What is the best way to display all Images not tagged with anything?

  • You can go to the backend and check the "Exclude" checkbox for the images you don't want shown in the media gallery. – Marius Feb 24 '15 at 15:19
3

based on the comments....

You can go to the backend and check the "Exclude" checkbox for the images you don't want shown in the media gallery.

All the images that have this "exclude" checkbox checked are ignored by the getGalleryImages method.

  • Thank Marius...+1from me. – Amit Bera Feb 24 '15 at 16:13
  • 1
    What if need to do this programmatically? i have a situation where images are used on two places how i can get them with custom code? @Marius♦ – Xabby Feb 28 '17 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.