bool InitComponentTemplate([ string templatePage] );
The method initializes the component template. After calling this method, a template object can be obtained using CBitrixComponent::GetTemplate. In this case, the component template is included using CBitrixComponent::ShowComponentTemplate.
If the component does not require template, use CBitrixComponent::IncludeComponentTemplate which initializes and includes the template at a single call.
Parameter | Description |
---|---|
templatePage | The name of a component template page. For compound components, this parameter must be specified. For simple components, it may be an empty string or may be omitted. |
Returns true on success, or false otherwise.
if ($this->InitComponentTemplate($templatePage)) { $template = & $this->GetTemplate(); $folderPath = $template->GetFolder(); if (strlen($folderPath) > 0) { * * * } $this->ShowComponentTemplate(); }
© 2001-2007 Bitrix | Bitrix Site Manager |