diff --git a/code/controllers/DocumentationViewer.php b/code/controllers/DocumentationViewer.php index dffe655..34d5072 100755 --- a/code/controllers/DocumentationViewer.php +++ b/code/controllers/DocumentationViewer.php @@ -54,6 +54,11 @@ class DocumentationViewer extends Controller { */ protected $record; + /** + * @var DocumentationManifest + */ + protected $manifest; + /** * @config * @@ -287,9 +292,13 @@ class DocumentationViewer extends Controller { * @return DocumentationManifest */ public function getManifest() { - $flush = SapphireTest::is_running_test() || (isset($_GET['flush'])); + if(!$this->manifest) { + $flush = SapphireTest::is_running_test() || (isset($_GET['flush'])); - return new DocumentationManifest($flush); + $this->manifest = new DocumentationManifest($flush); + } + + return $this->manifest; } /** @@ -317,8 +326,6 @@ class DocumentationViewer extends Controller { $record = $this->getPage(); $current = $this->getEntity(); - - foreach($entities as $entity) { // only show entities with the same language @@ -638,4 +645,8 @@ class DocumentationViewer extends Controller { public function getDocumentationTitle() { return $this->config()->get('documentation_title'); } + + public function getDocumentationBaseHref() { + return Config::inst()->get('DocumentationViewer', 'link_base'); + } }