Views: 8892
Last Modified: 12.09.2014

Enhanced template buffering methods permit not to use EndViewTarget() any longer because the end of a template automatically terminates buffering.

Now, there is a standard caching support in components.

  • template.php:
    	<div class="element-filter">
    		<!--filter display -->
    <div class="element-list">
    	<!--list display -->
  • header.php:
    <div id="sidebar">

Methods available in a template (through &this)

  • CBitrixComponentTemplate::SetViewTarget($view, $pos)
  • CBitrixComponentTemplate::EndViewTarget()

$APPLICATION global object methods

  • Cmain::AddViewContent($view, $content, $pos)
  • Cmain::ShowViewContent($view)


$view is the buffered area identifier;

$content is the buffered content;

$pos is the sorting of the displayed contents.

Note: Several buffers may correspond to one $view identifiers. The $pos sorting determines the sequence of the content display.

Courses developed by Bitrix24