[TYPO3] Preserve random sort of menu
Tapio Markula
tapio.markula at xetpoint.fi
Sat Jul 19 09:16:24 CEST 2008
Elijah kirjoitti:
> Hi,
>
> If I understand you correctly - you suggested to have a separate ts to
> the next level to make each menu sort by title or something else instead
> of random inside the subnav?
>
> I actually presented this solution before but my client didn't like
> it :( He really wanted to preserve each menu item sort after a random
> order and should remain until the user clicks on the main nav again.
make an XCLASS for the file
typo3/cms/tslib/class.tslib_fe.php
redine funtion
function getPageShortcut
change this
if ($mode==2 && count($pageArray)) { // random
$this->make_seed();
$randval = intval(rand(0,count($pageArray)-1));
$pO = $randval;
}
1) you should make from $randval = intval(rand(0,count($pageArray)-1));
a cookie, which depend of pid and store the cookie
2) you should test, if cookie exists and use the value from the cookie
instead of new value
3) make function to delete the cookie with reasonable way
More information about the TYPO3-english
mailing list