Ignore:
Timestamp:
Dec 11, 2013, 12:15:15 PM (11 years ago)
Author:
chronos
Message:
  • Added: Pages should have set title which is used in HTML header to show title in web browser title bar.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/system.php

    r630 r636  
    231231  function ShowPage()
    232232  {
     233        $Output = '';
    233234    /* @var $Page Page */
    234235    $ClassName = $this->SearchPage($this->PathItems, $this->Pages);
     
    237238      $Page = new $ClassName($this);
    238239      $Output = $Page->GetOutput();
    239       if($Page->RawPage == false) $Output = $this->BaseView->ShowPage($Output);
    240       echo($Output);
    241     } else echo($this->BaseView->ShowPage($this->PageNotFound()));
     240      $this->BaseView->Title = $Page->Title;
     241      if($Page->RawPage == false) $Output = $this->BaseView->ShowPage($Output);     
     242    } else {
     243        $Output = $this->PageNotFound();
     244        $this->BaseView->Title = T('Page not found');
     245        $Output = $this->BaseView->ShowPage($Output);
     246    }
     247    echo($Output);
    242248  }
    243249}
     
    245251class BaseView extends View
    246252{
     253        var $Title;     
     254       
    247255        function ShowTopBar()
    248256        {
     
    387395                '<link rel="shortcut icon" href="'.$this->System->Link('/images/favicon.ico').'" />';
    388396                $Output .= $this->System->ModuleManager->Modules['News']->ShowRSSHeader();
    389                 $Output .= '<title>'.$this->System->Config['Web']['Title'].'</title>'.
     397                $Title = $this->System->Config['Web']['Title'];
     398                if($this->Title != '') $Title = $this->Title.' - '.$Title;
     399                $Output .= '<title>'.$Title.'</title>'.
    390400                '</head><body>';
    391401       
Note: See TracChangeset for help on using the changeset viewer.