public function SetToggle() {
      $Session = Gdn::Session();
      if (!$Session->IsValid())
         return;
      
      $ShowAllCategories = GetIncomingValue('ShowAllCategories', '');
      if ($ShowAllCategories != '') {
         $ShowAllCategories = $ShowAllCategories == 'true' ? TRUE : FALSE;
         $ShowAllCategoriesPref = $Session->GetPreference('ShowAllCategories');
         if ($ShowAllCategories != $ShowAllCategoriesPref)
            $Session->SetPreference('ShowAllCategories', $ShowAllCategories);
            
         Redirect('/'.ltrim(Gdn::Request()->Path(), '/'));
      }
   }