Commit c6fe5449e645967517b78ab1982e3672f2869b91
1 parent
9e367e7e
- templates are now much more aggressive about guessing a title when
the dispatcher doesn't actively set it. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4611 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
13 additions
and
0 deletions
lib/templating/kt3template.inc.php
| ... | ... | @@ -232,6 +232,19 @@ class KTPage { |
| 232 | 232 | $this->show_portlets = false; |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | + if (empty($this->title)) { | |
| 236 | + if (!empty($this->breadcrumbDetails)) { | |
| 237 | + $this->title = $this->breadcrumbDetails; | |
| 238 | + } else if (!empty($this->breadcrumbs)) { | |
| 239 | + $this->title = array_slice($this->breadcrumbs, -1); | |
| 240 | + $this->title = $this->title[0]['label']; | |
| 241 | + } else if (!empty($this->breadcrumbSection)) { | |
| 242 | + $this->title = $this->breadcrumbSection['label']; | |
| 243 | + } else { | |
| 244 | + $this->title = $this->componentLabel; | |
| 245 | + } | |
| 246 | + } | |
| 247 | + | |
| 235 | 248 | $oTemplating = new KTTemplating; |
| 236 | 249 | $oTemplate = $oTemplating->loadTemplate($this->template); |
| 237 | 250 | $aTemplateData = array( | ... | ... |