From 2c14639d0d52728ba05929ae93b59565f9eef997 Mon Sep 17 00:00:00 2001 From: buttle Date: Sun, 24 Oct 2021 22:42:03 +0200 Subject: [PATCH] controller resolves template map --- config/module.config.php | 10 ++++++++-- src/Controller/ArchiveSiteMetaController.php | 8 ++++++++ view/archiveSiteMeta/collections/index.phtml | 0 view/collections/index.phtml | 3 +++ 4 files changed, 19 insertions(+), 2 deletions(-) delete mode 100644 view/archiveSiteMeta/collections/index.phtml diff --git a/config/module.config.php b/config/module.config.php index 581fcce..7f103b9 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -11,13 +11,19 @@ return [ 'options' => [ 'route' => '/collections', 'defaults' => [ - 'controller' => Controller\ArchiveSiteMeta::class, + '__NAMESPACE__' => 'ArchiveSiteMeta\Controller', + 'controller' => Controller\ArchiveSiteMetaController::class, 'action' => 'index', ], ], ], ], ], + 'controllers' => [ + 'invokables' => [ + Controller\ArchiveSiteMetaController::class => Controller\ArchiveSiteMetaController::class, + ], + ], 'view_manager' => [ 'template_path_stack' => [ dirname(__DIR__) . '/view', @@ -25,7 +31,7 @@ return [ 'template_map' => [ // used to remove available blocks when editing a page 'omeka/site-admin/page/edit' => __DIR__ . '/../../../themes/archive/view/omeka/site-admin/page/edit.phtml', - + 'archive-site-meta/archive-site-meta/index' => __DIR__ . '/../view/collections/index.phtml', //'layout/layout' => __DIR__ . '/../../../themes/archive/view/layout/layout.phtml', //'omeka/index/index' => __DIR__ . '/../../../themes/archive/view/omeka/site/index/index.phtml', //'omeka/search/results' => __DIR__ . '/../../../themes/archive/view/omeka/search/results.phtml', diff --git a/src/Controller/ArchiveSiteMetaController.php b/src/Controller/ArchiveSiteMetaController.php index d4a48d0..9fcf529 100644 --- a/src/Controller/ArchiveSiteMetaController.php +++ b/src/Controller/ArchiveSiteMetaController.php @@ -6,8 +6,16 @@ use Laminas\View\Model\ViewModel; class ArchiveSiteMetaController extends AbstractActionController { + + public function __construct() + { + + } + public function indexAction() { + $view = new ViewModel; + return $view; } } diff --git a/view/archiveSiteMeta/collections/index.phtml b/view/archiveSiteMeta/collections/index.phtml deleted file mode 100644 index e69de29..0000000 diff --git a/view/collections/index.phtml b/view/collections/index.phtml index e69de29..fd4d315 100644 --- a/view/collections/index.phtml +++ b/view/collections/index.phtml @@ -0,0 +1,3 @@ + + +