You must first sign up to be able to contribute.

Version 1 (modified by cedric, 9 years ago)

sfPropelManualOrderPlugin (For symfony 1.1)


This module adds simple manual ordering/sort for the admin generator

Error: Macro Image(screenshot.png) failed
Attachment sfPropelManualOrderPluginFor11: screenshot.png does not exist.


  • Install the plugin

Get it from here and unpack into your plugins directory

  • create the sf_sortable table in your database
		CREATE TABLE `sf_sortable`
		        `sortable_id` INTEGER  NOT NULL AUTO_INCREMENT,
		        `list_name` VARCHAR(40)  NOT NULL,
		        `object_id` INTEGER  NOT NULL,
		        `sort_val` INTEGER  NOT NULL,
		        PRIMARY KEY (`sortable_id`),
		        KEY `list`(`list_name`, `sort_val`, `object_id`)
		Enable the sfOpenIDAuth module
  • configure the generator.yml in your admin modules
    theme:            sortable 				 # change the theme
       _moveTop: -                     # add these actions
			 _moveUp: -                      # 
       _moveDown: -                    # 
       _moveBottom: -                  # 
  • link or copy the images to the admin dir
  cp plugins/sfPropelManualOrderePlugin/web/images/* to web/sf/sf_admin/images/


  • the plugin is designed for ease of use with the admin generator
  • take a look at the sfPropelActAsSortableBehaviorPlugin, which adds similar behaviours to the model
  • works with int primary keys
  • doesn't enforce consistency (but inconsistencies don't break it)
  • is inefficient for high transaction volumes or large lists
  • is not concurrency safe
  • there's an excellent tutorial on how to do manual order:

  • icons are thanks to Mark James' great 'Silk' icon set:
  • you can add sort functions into your model classes e.g. in lib/model/MyClass.php, add the lines:
    	        // adding moveUp, moveDown, toTop, toBottom, getSortRank, getSortedList (uses sfMixer/__call)


1.0: initial release, copy Beetween version for symfony 1.0 and the new default template for sfPropelAdmin