diff --git a/Module.php b/Module.php index e300903..73eed2c 100644 --- a/Module.php +++ b/Module.php @@ -13,8 +13,6 @@ use Laminas\Mvc\Controller\AbstractController; use Omeka\Mvc\Controller\Plugin\Messenger; - - class Module extends AbstractModule { const NAMESPACE = __NAMESPACE__; @@ -37,21 +35,12 @@ class Module extends AbstractModule public function onEventMergeConfig(ModuleEvent $event): void { - // Check if the main site is skipped, else the standard urls apply. - #if (!SLUG_MAIN_SITE) { - # return; - #} /** @var \Laminas\ModuleManager\Listener\ConfigListener $configListener */ $configListener = $event->getParam('configListener'); // At this point, the config is read only, so it is copied and replaced. $config = $configListener->getMergedConfig(false); - /* - if (isset($config['view_helpers']['invokables']['Omeka\Form\Element\HtmlTextarea'])) { - unset($config['view_helpers']['invokables']['Omeka\Form\Element\HtmlTextarea']); - } - */ /* if (isset($config['block_layouts']['factories']['html'])) { unset($config['block_layouts']['factories']['html']); @@ -66,19 +55,7 @@ class Module extends AbstractModule if (isset($config['block_layouts']['invokables']['browsePreview'])) { unset($config['block_layouts']['invokables']['browsePreview']); } - // Manage the routes for the main site when "s/site-slug/" is skipped. - // So copy routes from "site", without starting "/". - /* - foreach ($config['router']['routes']['site']['child_routes'] as $routeName => $options) { - // Skip some routes for pages that are set directly in the config. - if (isset($config['router']['routes']['top']['child_routes'][$routeName])) { - continue; - } - $config['router']['routes']['top']['child_routes'][$routeName] = $options; - $config['router']['routes']['top']['child_routes'][$routeName]['options']['route'] = - ltrim($config['router']['routes']['top']['child_routes'][$routeName]['options']['route'], '/'); - } - */ + $configListener->setMergedConfig($config); } diff --git a/config/module.config.php b/config/module.config.php index 78c3884..077878a 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -8,10 +8,10 @@ return [ ], 'template_map' => [ //'layout/layout' => __DIR__ . '/../../../themes/archive/view/layout/layout.phtml', - 'omeka/index/index' => __DIR__ . '/../../../themes/archive/view/omeka/site/index.phtml', + //'omeka/index/index' => __DIR__ . '/../../../themes/archive/view/omeka/site/index/index.phtml', 'omeka/search/results' => __DIR__ . '/../../../themes/archive/view/omeka/search/results.phtml', 'omeka/site-admin/page/edit' => __DIR__ . '/../../../themes/archive/view/omeka/site-admin/page/edit.phtml', - 'common/site-list-entry' => __DIR__ . '/../../../themes/archive/view/common/site-list-entry.phtml', + //'common/site-list-entry' => __DIR__ . '/../../../themes/archive/view/common/site-list-entry.phtml', ], ], 'view_helpers' => [ diff --git a/src/Site/BlockLayout/ArchiveSiteMeta.php b/src/Site/BlockLayout/ArchiveSiteMeta.php index d41cf4b..b551db4 100644 --- a/src/Site/BlockLayout/ArchiveSiteMeta.php +++ b/src/Site/BlockLayout/ArchiveSiteMeta.php @@ -96,10 +96,16 @@ class ArchiveSiteMeta extends AbstractBlockLayout public function render(PhpRenderer $view, SitePageBlockRepresentation $block) { + if ($view->site->title() === "Collections") { + $site = null; + } else { + $site = $view->site; + } return $view->partial('common/block-layout/site-meta', [ 'artist' =>$block->dataValue('currator'), 'project_date' => $block->dataValue('project_date'), 'collection' => $block->dataValue('collection'), + 'site' => $site, ]); } } diff --git a/view/common/block-layout/site-meta.phtml b/view/common/block-layout/site-meta.phtml index 404c4a1..6f67422 100644 --- a/view/common/block-layout/site-meta.phtml +++ b/view/common/block-layout/site-meta.phtml @@ -1,4 +1,5 @@ + +