Changeset 279 in t29-www for lib/template.php
- Timestamp:
- Jul 19, 2012, 7:10:15 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/template.php
r278 r279 40 40 $this->conf[$msg] = $this->conf['lang_path'] . $this->msg->_($msg); 41 41 42 // store informations about the current page 43 $this->conf['seiten_link'] = $this->menu->get_link(); 44 $this->conf['seite_in_nav'] = $this->menu->get_link_navigation_class($this->conf['seiten_link']); 45 $this->conf['seite_in_ul'] = $this->menu->get_link_ul_classes($this->conf['seiten_link']); 46 42 47 // setup body classes: 43 $this->body_classes[] = "lang-" . $this->conf['lang']; 44 $this->body_classes[] = "page-" . $this->conf['seiten_id']; 45 $this->body_classes = array_merge($this->body_classes, $this->menu->get_link_classes()); 48 $body_classprefixes = array( 49 // css prefix => configuration array value 50 'lang-' => 'lang', 51 'page-' => 'seiten_id', 52 'in-nav-' => 'seite_in_nav', 53 'in-' => 'seite_in_ul', 54 ); 55 foreach($body_classprefixes as $prefix => $key) { 56 if(is_array($this->conf[$key])) 57 // append each element of array conf values 58 foreach($this->conf[$key] as $x) 59 $this->body_classes[] = $prefix . $x; 60 elseif($this->conf[$key]) // skip null/false/empty conf values 61 $this->body_classes[] = $prefix . $this->conf[$key]; 62 } 46 63 47 64 // setup javascript configuration 48 $this->javascript_config['lang'] = $this->conf['lang']; 49 $this->javascript_config['seiten_id'] = $this->conf['seiten_id']; 65 $javascript_transfer = array('lang', 'seiten_id', 'seite_in_nav', 'seite_in_ul'); 66 foreach($javascript_transfer as $key) 67 $this->javascript_config[$key] = $this->conf[$key]; 50 68 51 69 // get all kind of relations … … 58 76 // FIXME: There is no caching check yet for this setting 59 77 // (new pagecss file won't be detected and wont purge the tmpl cache) 78 79 // setup html title 80 $this->conf['html_title'] = ''; 81 if(isset($this->conf['titel']) && !empty($this->conf['titel'])) 82 $this->conf['html_title'] = $this->conf['titel'] . ' - '; 83 elseif($this->conf['seiten_id'] == $this->msg->_('homepage-pagename')) 84 {} // nop: Startseitentitel soll nur sein "technikum29" 85 elseif($this->conf['seiten_link']) 86 // Titel vom Menu nehmen 87 $this->conf['html_title'] = $this->conf['seiten_link'] . ' - '; 88 $this->conf['html_title'] .= $this->msg->_('html-title'); 60 89 } 61 90 … … 98 127 <head> 99 128 <meta charset="utf-8"> 100 <title><?php echo isset($this->conf['titel']) ? $this->conf['titel'].' - ' : ''; $p('html-title'); ?></title>129 <title><?php echo $this->conf['html_title']; ?></title> 101 130 <meta name="description" content="Produziert am 08.01.2012"> 102 131 <meta name="author" content="Sven"> … … 233 262 <ul> 234 263 <?php 264 // only print menu when in sidebar where it applies 265 if($this->conf['seite_in_nav'] == 'side') 235 266 foreach($this->page_relations as $rel => $a) { 236 267 printf("\t<li class='%s'><a href='%s' title='%s'>%s <strong>%s</strong></a>\n",
Note: See TracChangeset
for help on using the changeset viewer.