yestravel,
ну этот изврат будет выглядеть примерно так тогда, если без шаблона и контроллера:
<?php
$oStructure = Core_Entity::factory('Structure', CURRENT_STRUCTURE_ID);
if ($oStructure->path == '/') {
?>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="block block-side-nav first">
<div class="block-title">
<strong>
<i class="fa fa-barcode"></i>
<span>Отзывы о товарах</span>
</strong>
</div>
<div class="block-content">
<?php
}
?>
<?php
$oComments = Core_Entity::factory('Comment');
$oComments
->queryBuilder()
->join('comment_shop_items', 'comments.id', '=', 'comment_shop_items.comment_id')
->join('shop_items', 'shop_items.id', '=', 'comment_shop_items.shop_item_id')
->where('shop_id', '=', 3)
->where('comments.active', '=', 1)
->orderBy('comments.datetime', 'DESC')
->limit(5);
$aComments = $oComments->findAll();
$oStructure = Core_Entity::factory('Structure', CURRENT_STRUCTURE_ID);
if ($oStructure->path == '/') {
foreach($aComments as $oComment)
{
$sStructurePath = $oComment->Shop_Item->Shop->Structure->getPath();
?>
<dl style="padding:0 20px 0 20px">
<dt>
<?php echo $oComment->Shop_Item->getName()?><br/>
<span style="font-weight:400; font-size:80%;">
<?php echo htmlspecialchars($oComment->author).' '.Core_Date::sql2date($oComment->datetime)?>
</span>
</dt>
<dd>
<div class="articles-descr">
<a href="<?php echo $sStructurePath . $oComment->Shop_Item->getPath()?>"><?php echo strip_tags ($oComment->text)?></a>
</div>
</dd>
</dl>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>