variables['content_id']; if( !$this->_content_id || !$this->_template || $cid != $this->_content_id ) { $contentobj = $gCms->variables['content_obj']; $templateops = $gCms->GetTemplateOperations(); if ($contentobj->TemplateId() && $contentobj->TemplateId() > -1) { $this->_template = $templateops->LoadTemplateByID($contentobj->TemplateId()); } else { $this->_template = $templateops->LoadDefaultTemplate(); } $this->_content_id = $cid; } return $this->_template; } public function __get($name) { $gCms = cmsms(); $contentobj = $gCms->variables['content_obj']; if ($contentobj != null) { switch ($name) { case 'content_id': { return $contentobj->Id(); } case 'content_title': { return $contentobj->Name(); } case 'content_alias': { return $contentobj->Alias(); } case 'content_menutext': { return $contentobj->MenuText(); } case 'content_titleattribute': { return $contentobj->TitleAttribute(); } case 'content_hierarchy': { return $contentobj->Hierarchy(); } case 'content_id_hierarchy': { return $contentobj->IdHierarchy(); } case 'content_type': { return $contentobj->Type(); } case 'content_props': { return $contentobj->mProperties->mPropertyNames; } case 'content_metadata': { return $contentobj->Metadata(); } case 'content_created_date': { return $contentobj->GetCreationDate(); } case 'content_modified_date': case 'content_last_modified_date': { return $contentobj->GetModifiedDate(); } case 'content_last_modified_by_id': { return $contentobj->LastModifiedBy(); } case 'template_id': { $template = $this->_get_template(); return ($template != null ? $template->Id() : null); } case 'template_encoding': { $template = $this->_get_template(); return ($template != null ? $template->encoding : null); } case 'template_modified_date': { $template = $this->_get_template(); return ($template != null ? $template->modified_date : null); } case 'cachable': { $template = $this->_get_template(); return $contentobj->Metadata(); } default: { return null; } } } } } # vim:ts=4 sw=4 noet ?>