From 27a4f91d70367961234b7331b00be5e5c1df42f4 Mon Sep 17 00:00:00 2001 From: martimiz Date: Mon, 12 Nov 2012 16:19:44 +0100 Subject: [PATCH 1/2] Fix: missing 'current' linking mode in top-level menu If there are no children, the LinkingMode was set to 'link' and never to 'current' --- code/controllers/DocumentationViewer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/controllers/DocumentationViewer.php b/code/controllers/DocumentationViewer.php index 9a59a2c..9c577df 100755 --- a/code/controllers/DocumentationViewer.php +++ b/code/controllers/DocumentationViewer.php @@ -546,7 +546,10 @@ class DocumentationViewer extends Controller { return $children; } - } + } else { + if ($page->getRelativeLink() == $this->Remaining[$level]) { + $page->LinkingMode = 'current'; + } } return false; From f2b643871ec7fe3601fcb0bc3c8f20f86cdc2d06 Mon Sep 17 00:00:00 2001 From: martimiz Date: Mon, 12 Nov 2012 16:24:55 +0100 Subject: [PATCH 2/2] Fix: provide styling for 404 pages --- templates/DocumentationViewer.ss | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/DocumentationViewer.ss b/templates/DocumentationViewer.ss index ef493bb..2f92ee8 100755 --- a/templates/DocumentationViewer.ss +++ b/templates/DocumentationViewer.ss @@ -5,6 +5,7 @@ <% base_tag %> SilverStripe Documentation + <% require css(docsviewer/css/DocumentationViewer.css) %>