Revision #2 has been created by Matt Kelliher on Mar 11, 2010, 2:10:50 AM with the memo:
Typo...
« previous (#1) next (#3) »
Changes
Title
unchanged
Ordering Models by Weight with CJuiSortable
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
Content
changed
In this tutorial we will be setting up a content type to be ordered by weight using the JUI Sortable plugin.
*Note: This is
probably not suitable for large data
sets, as each model is updated on submission.*
**Tutorial Requirements**[...]
// Set the number of models to be the heaviest weight
// and format into a dropDownList-friendly array
$models = BlogYourClass::model()->findAll();
for ($i = 0; $i < sizeof($models); $i++) { $weights[$i] = $i; }
echo CHtml::activeDropDownList($model, 'weight', $weights);
?>[...]