public function executeShowArticle(sfWebRequest $request) { $this->categories = CategoryPeer::getActiveCategories(); $this->article = ArticlePeer::retrieveByPK($request->getParameter('article_id')); $this->forward404If(!$this->article); $this->paths = array(); $this->paths[] = array('text' => $this->article->getSubCategory()->getCategory()->getName(), 'link' => $this->getController()->genUrl('sophiaStore/listArticle?id=' . $this->article->getSubCategory()->getCategory()->getId())); $this->paths[] = array('text' => $this->article->getName(), 'link' => $this->getController()->genUrl('sophiaStore/showArticle?article_id=' . $this->article->getId())); $this->relatedArticles = ArticlePeer::getRelatedArticles(4, $this->article->getId(), $this->article->getSubCategoryId()); }