. */ // $Id: xhtml_single.php 68 2010-01-16 11:11:50Z extremo $ require_once('xhtml.php'); class xhtml_single extends xhtml { protected $pageOrder = array(); protected $pageContent = array(); /** * Initializes the generation. * * @param tfProject $project The project * @param String $path Output path */ public function init($project, $path) { $this->translate = tfTranslate::get(); $this->date = date('d.m.Y'); $this->project = $project; $this->path = $path; } // end init(); /** * Generates a single page and saves it on the disk. * * @param Array $page The page meta-info. */ public function generate($page) { tfTags::setTagList($page['Tags']); $nav = array(); $this->_currentPage = $page; $nav[$page['Id']] = $page['Tags']['ShortTitle']; $parent = $page['_Parent']; do { $parent = $this->project->getMetaInfo($parent, false); if(!is_null($parent)) { $nav[$parent['Id']] = $parent['Tags']['ShortTitle']; $parent = $parent['_Parent']; } } while(!is_null($parent)); $nav = array_reverse($nav, true); $code = $this->createTopNavigator($page); $subtitle = ''; if(isset($page['Tags']['Appendix']) && $page['Tags']['Appendix']) { $subtitle = $this->translate->_('tags', 'appendix').' '; if(!$this->project->config['showNumbers']) { $subtitle = trim($subtitle).': '; } } if($this->project->config['showNumbers']) { $code .= '
'.$this->_tagVersion['since'].'
';
}
if(isset($this->_tagVersion['to']))
{
$reference .= ' '.$this->translate->_('general', 'period_to').' '.$this->_tagVersion['to'].'
';
}
$reference .= 'Copyright © '.$this->project->config['copyright'].' |
'.$this->translate->_('general','doc_license',$this->project->config['license']).' |
'.$this->translate->_('general','generated_in',$this->date).' |