From c6fe5449e645967517b78ab1982e3672f2869b91 Mon Sep 17 00:00:00 2001 From: bshuttle Date: Wed, 18 Jan 2006 14:02:00 +0000 Subject: [PATCH] - templates are now much more aggressive about guessing a title when the dispatcher doesn't actively set it. --- lib/templating/kt3template.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+), 0 deletions(-) diff --git a/lib/templating/kt3template.inc.php b/lib/templating/kt3template.inc.php index f8c0ab0..dd27673 100644 --- a/lib/templating/kt3template.inc.php +++ b/lib/templating/kt3template.inc.php @@ -232,6 +232,19 @@ class KTPage { $this->show_portlets = false; } + if (empty($this->title)) { + if (!empty($this->breadcrumbDetails)) { + $this->title = $this->breadcrumbDetails; + } else if (!empty($this->breadcrumbs)) { + $this->title = array_slice($this->breadcrumbs, -1); + $this->title = $this->title[0]['label']; + } else if (!empty($this->breadcrumbSection)) { + $this->title = $this->breadcrumbSection['label']; + } else { + $this->title = $this->componentLabel; + } + } + $oTemplating = new KTTemplating; $oTemplate = $oTemplating->loadTemplate($this->template); $aTemplateData = array( -- libgit2 0.21.4