public function renderDefault($category = '') { $selectedCategory = $this->articleManager->getCategory($category); if (!$selectedCategory) { throw new BadRequestException(); } $this->template->selectedCategory = $selectedCategory; $this->template->categories = $this->articleManager->findCategories(); $this->template->articles = $this->articleManager->findAllInCategory($category, $this->language); }