Skip to content

Commit

Permalink
Fixed display of navigation for a page not in menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Berthereau authored and Daniel Berthereau committed Jan 15, 2024
1 parent 3f3937b commit 3e2b53b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/src/Controller/SiteAdmin/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function addPageAction()
$formData = $form->getData();
$formData['o:site']['o:id'] = $site->id();
$formData['o:is_public'] = !empty($post['o:is_public']);
$formData['o:layout_data']['template_name'] = $post['template_name'];
$formData['o:layout_data']['template_name'] = $post['template_name'] ?? null;
$response = $this->api($form)->create('site_pages', $formData);
if ($response) {
$page = $response->getContent();
Expand Down
2 changes: 1 addition & 1 deletion application/view/omeka/site/page/show.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ switch ($this->siteSetting('subnav_display')) {
$displaySubnav = false;
break;
default:
$displaySubnav = $this->displayNavigation && $activePage['page']->hasPages();
$displaySubnav = $this->displayNavigation && $activePage && $activePage['page']->hasPages();
}
$showPagePagination = $this->siteSetting('show_page_pagination', true);
?>
Expand Down

0 comments on commit 3e2b53b

Please sign in to comment.