From 96da9e08d6093c05fff2a22aa483529adbef727a Mon Sep 17 00:00:00 2001 From: Aaron Bushnell Date: Tue, 15 Dec 2020 10:40:51 -0500 Subject: [PATCH] Ensure sections are dynamic --- src/controllers/DefaultController.php | 5 +++-- src/templates/index.twig | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/controllers/DefaultController.php b/src/controllers/DefaultController.php index 3b7d01e..2ce12bc 100644 --- a/src/controllers/DefaultController.php +++ b/src/controllers/DefaultController.php @@ -68,9 +68,10 @@ public function actionIndex() // Display the template with the custom variables return $this->renderTemplate('guide-module/index', [ - "pluginName" => Config::getName(), + "pluginName" => Config::getName(), + "guideSection" => Config::getSection(), "entry" => Entry::findOne([ - 'section' => 'userManual', + 'section' => Config::getSection(), 'id' => Craft::$app->request->getSegment(2) ]) ]); diff --git a/src/templates/index.twig b/src/templates/index.twig index bef26f4..b25ef47 100644 --- a/src/templates/index.twig +++ b/src/templates/index.twig @@ -7,7 +7,7 @@ {% block sidebar %}