Skip to content

Commit

Permalink
#1339 - Embeds for all content types - count views when embed object …
Browse files Browse the repository at this point in the history
…is viewed
  • Loading branch information
romanlesnikov committed Mar 3, 2022
1 parent 84208ab commit 0ded67a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/base/general/classes/BxBaseModGeneralModule.php
Expand Up @@ -109,6 +109,14 @@ public function actionEmbed($iContentId, $sUnitTemplate = '', $sAddCode = '')
if(empty($sUnitTemplate))
$sUnitTemplate = 'unit_gallery.html';

$CNF = &$this->_oConfig->CNF;

if(!empty($CNF['OBJECT_VIEWS'])) {
$oView = BxDolView::getObjectInstance($CNF['OBJECT_VIEWS'], $iContentId);
if($oView && $oView->isEnabled())
$oView->doView();
}

$oTemplate->getEmbed($this->_oTemplate->unit($aContentInfo, true, $sUnitTemplate) . $sAddCode);
}

Expand Down

0 comments on commit 0ded67a

Please sign in to comment.