Example #1
0
 public static function getCategoryRoute($catid)
 {
     $needles = array('items' => array((int) $catid));
     //Create the link
     $link = 'index.php?option=com_djclassifieds&view=items';
     if ((int) $catid >= 0) {
         $cat_path = DJClassifiedsCategory::getSEOParentPath((int) $catid);
         if ($cat_path) {
             $path = $cat_path;
             $path[] = '0:all';
             $needles['items'] = $path;
             $link .= '&cid=' . $catid;
         }
     }
     if ($item = self::_findItem($needles)) {
         $link .= '&Itemid=' . $item;
     }
     return $link;
 }