shopp('collection.coverimage')

Displays the cover image for the category.

The cover image, or default image is the image that is set as the first image when using a custom image order, or which ever image is automatically sorted to be first when using other image order settings set in the Presentation Settings screen.

This tag will only work for custom categories as you cannot assign an image asset to a smart collection.

Options

  • alt: The alt property of the image
  • bg: The background color to use with the matte fit (#rrggbb, default is #ffffff)
  • class: Specifies the CSS class of the image
  • fit: The fit of unproportional images to the requested size (defaults to all) :
    ** width — Scale the image down to fit the image in the new size by the width, cropping any extra height
    ** height — Scale the image down to fit the image in the new size by the height, cropping any extra width
    ** crop — Scale the image down to fit by the smallest dimension to fill the entire image, cropping the extra off the other dimension (specific cropping adjustments can be made in the product editor)
    ** matte — Scale the image down to fit within the new size filling extra space with a background color
    ** all — Scale the image down to fit within the new size (the final size may differ from the specified dimensions)
  • quality: The JPEG image quality (0-100%, default is 80)
  • sharpen: Apply an unsharp mask to the image (100%-500%, default is none)
  • size: The size to use for width and height of the image (used in place of width and height)
  • title: The title property of the image
  • width: The width of the image in pixels
  • height: The height of the image in pixels
  • zoom: Enables the image zoom effect to view the original size image in a modal image viewer (Colorbox)
  • zoomfx: Enables zoom (also known as lightbox) effects for alternate JavaScript-based modal content viewers.

Examples

<?php shopp('collection','coverimage'); ?>

Use a Named Image Setting

<?php shopp('collection','coverimage','setting=category-thumbnails&zoomfx=fancybox'); ?>

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar