restruct/silverstripe-featuredimages

Extension to quickly add a (set of) featured image(s) to a pagetype

Installs: 179

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 2

Open Issues: 0

Type:silverstripe-vendormodule

3.1.4 2020-10-30 13:08 UTC

This package is auto-updated.

Last update: 2024-12-21 13:00:50 UTC


README

Features

  • Adds a simple uploadfield to a page for a featuredimage

One/single image

or set of featured images (max amount configurable)

multiple sortable images

Requirements

  • SilverStripe 4.1 or newer

Installation

composer require restruct/silverstripe-featuredimages dev-master

Apply extension to desired pagetypes:

Add to config.yml (max_featured_images is optional, default = 1):

Page:
  extensions:
    - '\Restruct\SilverStripe\FeaturedImages\FeaturedImageExtension'
  max_featured_images: 3

And use in templates as

$PageImage

or

<% loop $PageImages %>
    $Me
<% end_loop %>