Hi guys
Just wondering if you can point me in the right direction to modify this function. I use it to sort events by category and it works well. What I was hoping to do is add some code to the function to place one category first always.
The name of the category is Meeting and it has a category id number of 20.
Thanks for the help
Steve
// Sort events by category
function sortjeventsbycat($a,$b){
if ($a->getCategoryName() == $b->getCategoryName()){
if ($a->title() == $b->title()) {
return 0;
}
return ($a->title() < $b->title()) ? -1 : 1;
}
return $a->getCategoryName() < $b->getCategoryName() ? -1 : 1;
}