'/:(int)section_id/' ); } function index(&$reg, &$req, &$resp) { # getting all language specific faq sections $finder = &$this->getFinder('faq_sections'); $sections = &$finder->findAllBy('language_id', 1, 'title ASC'); # making the index variable available for the template engine $resp->assign('index', 1); # assigning the sections list $resp->assignRef('faq_sections', $sections); $resp->assign('content', 'faq_index.html'); $this->setPage('Frequently Asked Questions'); $this->setLayout('forum_base.html'); } function listing(&$reg, &$req, &$resp) { $dba = &$reg->get('dba'); # selecting all language specific faq items $sql = "SELECT i.* FROM k4_faq_sections AS s LEFT JOIN k4_faq_items AS i USING (section_id) WHERE s.language_id=1"; $items = &$dba->executeQuery($sql); # assigning the listing switch $resp->assign('listing', 1); # assigning the items list $resp->assignRef('faq_items', $items); $resp->assign('content', 'faq_listing.html'); $this->setPage('Frequently Asked Questions'); $this->setLayout('forum_base.html'); } function section(&$reg, &$req, &$resp) { $section_id = $req->get('section_id'); # getting all language specific faq sections $finder = &$this->getFinder('faq_sections'); $sections = &$finder->findAllBy('section_id', $section_id, 'title ASC'); # getting all section specific faq items $finder = &$this->getFinder('faq_items'); $items = &$finder->findAllBy('section_id', $section_id, 'question ASC'); $resp->assignRef('faq_items', $items); # assigning the sections & items list $resp->assignRef('faq_sections', $sections); $resp->assign('content', 'faq_index.html'); $this->setPage('Frequently Asked Questions'); $this->setLayout('forum_base.html'); } } ?>