diff --git a/modules/doc/application/controllers/ModuleController.php b/modules/doc/application/controllers/ModuleController.php index cdeca3e50..fd74050ec 100644 --- a/modules/doc/application/controllers/ModuleController.php +++ b/modules/doc/application/controllers/ModuleController.php @@ -47,4 +47,21 @@ class Doc_ModuleController extends DocController $moduleManager = Icinga::app()->getModuleManager(); $this->renderToc($moduleManager->getModuleDir($moduleName, '/doc'), $moduleName); } + + /** + * View a chapter of a module's documentation + * + * @throws Zend_Controller_Action_Exception + */ + public function chapterAction() + { + $moduleName = $this->getParam('moduleName'); + $this->assertModuleEnabled($moduleName); + $chapterName = $this->getParam('chapterName'); + if ($chapterName === null) { + throw new Zend_Controller_Action_Exception('Missing parameter "chapterName"', 404); + } + $moduleManager = Icinga::app()->getModuleManager(); + $this->renderChapter($chapterName, $moduleManager->getModuleDir($moduleName, '/doc')); + } }