diff --git a/landing_page.module b/landing_page.module index 2d53834..3627340 100644 --- a/landing_page.module +++ b/landing_page.module @@ -92,7 +92,7 @@ function landing_page_theme($existing, $type, $theme, $path) { } /** - * Implements hook_theme(). + * Implements hook_theme_alter(). */ function landing_page_theme_suggestions_page_alter(array &$suggestions, array $variables) { if ($node = \Drupal::routeMatch()->getParameter('node')) { @@ -337,7 +337,7 @@ function landing_page_get_templates() { $module_directory_path = opendir($landing_page_module_path); // Get custom templete path configured by admin. - $custom_path = $config->get('landing_page.landing_page_templates_custom_path'); + $custom_path = $config->get('landing_page_templates_custom_path'); if ($custom_path) { $custom_directory_path = opendir($custom_path); $paths_to_scan[] = $custom_directory_path; diff --git a/src/Form/LandingPageTemplatesForm.php b/src/Form/LandingPageTemplatesForm.php index 5930ff9..01263a6 100644 --- a/src/Form/LandingPageTemplatesForm.php +++ b/src/Form/LandingPageTemplatesForm.php @@ -30,10 +30,10 @@ class LandingPageTemplatesForm extends ConfigFormBase { $form['template_path'] = [ '#type' => 'textfield', '#title' => $this->t('Path to templates'), - '#default_value' => $config->get('landing_page.landing_page_templates_custom_path'), + '#default_value' => $config->get('landing_page_templates_custom_path'), '#description' => $this->t('Enter the custom path to template folder that holds landing page tpl files, Eg., "core/themes/bartik/templates/landing_pages/". By default template folders of active theme and - template folder of landing page module will be scanned. Naming of the tpl should be + template folder of landing page module will be scanned. Naming of the template should be landing-page--{type}.html.twig'), ]; $form['submit'] = [