SilverCommerce\CatalogueFrontend\Extensions\CategoryExtension
Simple extension to category to add image support. This is mostly for use in templates.
Synopsis
class CategoryExtension
extends DataExtension
{
- // methods
- public Image PrimaryImage()
- public void updateCMSFields()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
- $has_one
- $owns
Methods
public
- PrimaryImage() — Gets the main image to use for this category, this can either be the selected image, an image from the first product or the default "no-product" image.
- updateCMSFields() — Add the image upload field to the admin fields.