示例#1
0
    /**
     * If the current page is not to a document menu item, use the current document title
     */
    protected function _setPageTitle()
    {
        if ($this->getName() !== $this->getActiveMenu()->query['view'])
        {
            $document = $this->getModel()->fetch();

            $this->getParameters()->set('page_heading', $document->title);
            $this->getParameters()->set('page_title',   $document->title);
        }

        parent::_setPageTitle();
    }
示例#2
0
    /**
     * If the current page is not the menu category, use the current category title
     */
    protected function _setPageTitle()
    {
        if ($this->getName() === $this->getActiveMenu()->query['view'])
        {
            $category = $this->getModel()->fetch();
            $slug     = isset($this->getActiveMenu()->query['slug']) ? $this->getActiveMenu()->query['slug'] : null;

            if ($category->slug !== $slug) {
                $this->getParameters()->set('page_heading', $category->title);
                $this->getParameters()->set('page_title',   $category->title);
            }
        }

        parent::_setPageTitle();
    }