2017 © Pedro Peláez
 

silverstripe-module silverstripe-responsive-image

Responsive Image module for SilverStripe.

image

moosylvania/silverstripe-responsive-image

Responsive Image module for SilverStripe.

  • Tuesday, January 19, 2016
  • by obj63mc
  • Repository
  • 4 Watchers
  • 2 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SilverStripe-Responsive-Image

Responsive Image module for SilverStripe implementing the bottom-padding technique, (*1)

Requirements

  • SilverStripe 3.1.0+

Installation & Documentation

  1. Clone Repository or use Composer to pull this module down to your silverstripe project
  2. Any pages that are using the ResponsiveImage DataObject will need to include the following JS CSS on your site -, (*2)

    Requirements::javascript('SilverStripe/Responsive-Image/javascript/responsive-img.js');
    Requirements::css('SilverStripe/Responsive-Image/css/responsive-img.css');
  3. Instead of using the Image Object types on your page, use ResponsiveImage. ex., (*3)

    private static $has_one = array(
        'HeroImage' => 'ResponsiveImage'
    );
  4. Inside your Templates, to render the proper output you would then call -, (*4)

    $HeroImage.Responsive

Notes:

This Module was written and inspired from the padding-bottom hack that is documented at -, (*5)

http://www.smashingmagazine.com/2013/09/16/responsive-images-performance-problem-case-study/, (*6)

The Versions

19/01 2016

dev-master

9999999-dev

Responsive Image module for SilverStripe.

  Sources   Download

MIT

The Requires

 

by Joe Madde
by Mitch Viner

responsive image silverstripe