tags:

views:

75

answers:

1

What does reorder() function do in Joomla?

I have a statement for a function of menu "copy" in administrator code for menu as:

$curr->reorder( 'menutype = '.$this->_db->Quote($curr->menutype).' AND parent = '.(int) $curr->parent );

as i Have executed this code it has reordered my id to any other position.. I just need to know is this reorder() function a inbuilt function of joomla? If yes, WHat and how does it do what he has done it to my ids ? :(

I am Newbie to Joomla PLs help

EDIT

How can i get the the reordered output just after calling the function?

+1  A: 

Yes, the reorder() function is of Joomla and re-orders ids with respect to any child menu items.

Sarfraz
Pls chk my edited question...
OM The Eternity
@Sarfraz How can i get the the reordered output just after calling the function?
OM The Eternity
Take a look at the code in list.php after the snippet you've posted. `MenusHelper::cleanCache();` Next time te data will be accessed the associated cache will be empty and the re-ordered data will be retrieved from the database.
VolkerK
@VOLKERK NOT LIKE THAT, I need to print_r or echo out the values directly after the call of reorder function..
OM The Eternity
Is changing the "vanilla" reorder() function an option?
VolkerK
@Volkerk Whats This?????
OM The Eternity
I meant: Would you consider changing the code of function reorder() in libraries/joomla/database/table.php to be an option? All the values you want are "there", but they are simply not returned to the caller. Wouldn't be too difficult. But then you have a custom code base that may come back at you when you update to another joomla version.
VolkerK