Best solution for up/down links |
[eluser]NiconPhantom[/eluser]
Hi all I need move my menu elements up and down... What is the best solution for CI? Thank you! Alex
[eluser]obiron2[/eluser]
you need to get the menu elements into a sorted array. The easiest way is to store your menu elements in a database with a sort_order value Code: select * from menu_elements order by sort_order DESCENDING pass this to the view: Code: $data['menu_elements'] = $Menu_elements Code: foreach ($menu_elements as $ME)
[eluser]JoostV[/eluser]
Not sure if this is what you mean, but I use a jQuery plugin for my CMS: http://bitsinashortbit.wordpress.com/200...ry-plugin/ It creates a table of menu-items that can be dragged up and down. At the end of every drop I save the new order to the database. So, no arrows or numbers, just drag the items to the right positions.
[eluser]NiconPhantom[/eluser]
Thank you, thats very useful idea for me! Alex |
Welcome Guest, Not a member yet? Register Sign In |