Coder Social home page Coder Social logo

xmarkclx-silverstripe-extended-sortable-gallery-field's Introduction

SilverStripe Extended SortableGalleryField

Based off http://addons.silverstripe.org/add-ons/jonshutt/silverstripe-sortable-gallery-field.

Bulk upload images into a silverstripe gallery, drag and drop reordering. Choose files from desktop or images previously uploaded

The main difference is that this one allows sorting of subclasses of Image.

I.e

MyImageClass extends Image.

I found out image sorting does not work properly of the this is based off as of writing and made fixes but the fixes completely changed how it is done on the backend or the interface, thus it might break code that interfaces with John's code.

FEATURES

  • Subclasses support
  • bulk upload images
  • add images from files previously uploaded
  • drag and drop ordering of images

SAMPLE USAGE

class GalleryPage extends Page {
	static $has_many = array(  	 	
		'Images' => 'CustomImage'  
	);
	
	function getCMSFields() {
		$fields = parent::getCMSFields();
		
		$galleryField = new SortableGalleryField(
	            $name = 'Images',
	            $pageClassName = 'GalleryPage',
	            $className = 'CustomImage',
	            $title = 'Upload one or more images'
	        );
		$fields->addFieldToTab('Root.Images', $galleryField);
		
		return $fields;
	}
}

xmarkclx-silverstripe-extended-sortable-gallery-field's People

Contributors

xmarkclx avatar mark-christian-lopez avatar

Watchers

James Cloos avatar helpfulrobot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.