Custom view and item sorting in admin

edited February 2013 in Modules
Hi!
I'm trying to customize the item listing in the FUEL admin. In a custom module, I'd like to sort the items with jQueryUI+AJAX, setting items sortable; to do that, I've to change the render mode from "table" to "ul".
The method list_items() in the model sets the array values that will be passed to the Data_table library so I've to create a custom view and avoid the table render; but how can I do that?
I suppose I should create a php file in the /fuel/modules/MODULE_NAME/views but I'm not sure and I can't find similar situations in the blog module, except for the "themes" folder (but I can't figure out how it works).. Should I set any value in the module's configs?
I have not found in the documentation any tip about..
Thank you :)

Comments

  • edited 11:30AM
    There is a "views" array that you can set in your module config in MY_fuel_modules.php. This has a default value of the following in the 1.0 beta:'views' => array( 'list' => 'modules/module_list', 'create_edit' => 'modules/module_create_edit', 'delete' => 'modules/module_delete'),
    You'd need to change the 'list' key to your view location. You'll also need to specify the "view_location" value to point it to the correct module folder with "app" being the application folder.

    As an FYI, if you add a field with a name of "precedence", their will be a "Rearrange" button that appears and allows you to sort the items and then saves the order the the "precedence" field.
  • edited 11:30AM
    Ok, thank you very much! "Rearrange" is such a beautiful feature! ;)
Sign In or Register to comment.