Documentation

ShowViewContent

CMain::ShowViewContent(
  view
)

The method allows to adds the displayed content for the AddViewContent function. For example, this method displays dates in the content section of news. (simply collect dates of news in the news cycle, include into single string^ and pass in the AddViewContent method). This method primarily allows to avoid duplicating components and redundant cycles. Non-static method.

Function parameters

Parameter Description
viewBuffered area ID.

Examples of use

Add a link to h1 in the header.php component template:

<h1><?=$APPLICATION->ShowTitle();?><?$APPLICATION->ShowViewContent('news_detail');?></h1>

Add into the component template:

<?$this->SetViewTarget('news_detail');?>
   <noindex><a rel="nofollow" class="h1-head fancy" href="/develop/change_cover_type.php"><?=$arDataFilter["NAME"]?></a></noindex>
<?$this->EndViewTarget();?> 


© «Bitrix24», 2001-2024
Up