protected function generateCategoryUrl()
    {
        /** @var $target PageModel */
        if ($this->jumpTo && ($target = $this->objModel->getRelated('jumpTo')) instanceof PageModel) {
            $page = $target;
        } else {
            $page = $GLOBALS['objPage'];
        }

        $manager = System::getContainer()->get('codefog_news_categories.manager');

        /** @var NewsCategoryModel $category */
        $category = NewsCategoryModel::findPublishedByIdOrAlias(Input::get($manager->getParameterName()));

        // Generate the category URL
        if ($category !== null) {
            $url = $manager->generateUrl($category, $page);
        } else {
            // Generate the regular URL
            $url = $page->getFrontendUrl();
        }

        return $url;
    }
protected function generateCategoryUrl()
    {
        /** @var $target PageModel */
        if ($this->jumpTo && ($target = $this->objModel->getRelated('jumpTo')) instanceof PageModel) {
            $page = $target;
        } else {
            $page = $GLOBALS['objPage'];
        }

        $manager = System::getContainer()->get('codefog_news_categories.manager');

        /** @var NewsCategoryModel $category */
        $category = NewsCategoryModel::findPublishedByIdOrAlias(Input::get($manager->getParameterName()));

        // Generate the category URL
        if ($category !== null) {
            $url = $manager->generateUrl($category, $page);
        } else {
            // Generate the regular URL
            $url = $page->getFrontendUrl();
        }

        return $url;
    }
protected function generateCategoryUrl ( ) { /** @var $target PageModel */ if ( $ this -> jumpTo && ( $ target = $ this -> objModel -> getRelated ( 'jumpTo' ) ) instanceof PageModel ) { $ page = $ target ; } else { $ page = $ GLOBALS [ 'objPage' ] ; } $ manager = System :: getContainer ( ) -> get ( 'codefog_news_categories.manager' ) ; /** @var NewsCategoryModel $category */ $ category = NewsCategoryModel :: findPublishedByIdOrAlias ( Input :: get ( $ manager -> getParameterName ( ) ) ) ; // Generate the category URL if ( $ category !== null ) { $ url = $ manager -> generateUrl ( $ category , $ page ) ; } else { // Generate the regular URL $ url = $ page -> getFrontendUrl ( ) ; } return $ url ; }
Generate the menu URL with category

@return string
Generate the menu URL with category