Вот сам код виджета:
<?php $user = cmsUser::getInstance(); ?> <?php if ($items){ ?> <?php $big_image_preset = $big_image_preset ? $big_image_preset : 'big'; $first_item_is_private = $first_item['is_private'] && $hide_except_title && !$first_item['user']['is_friend']; ?> <?php foreach($items as $id=>$item) { ?> <?php $items[$id]['url'] = href_to($ctype['name'], $item['slug']) . '.html'; $items[$id]['is_private'] = $item['is_private'] && $hide_except_title && !$item['user']['is_friend']; if ($items[$id]['is_private']) { $image = default_images('private', $big_image_preset); } ?> <?php } ?> <div class="posts--slider-featured"> <?php foreach($items as $id=>$item) { ?> <?php $image = $item[$image_field]; if ($item['is_private']) { $image = default_images('private', 'micro'); } ?> <div class="posts__item posts__item--category-2"> <a href="<?php echo $item['url']; ?>" class="posts__link-wrapper"> <figure class="posts__thumb"> <?php echo html_image($image, 'big', $item['title']); ?> <div class="posts__inner"> <div class="posts__cat"> <span class="label posts__cat-label">The Team</span> </div> <h3 class="posts__title"><span class="posts__title-higlight"><?php html($item['title']); ?></span></h3> <div class="post-author"> <figure class="post-author__avatar"> <?php echo html_avatar_image($team['user_avatar']); ?> </figure> <div class="post-author__info"> <h4 class="post-author__name"><?php echo $item['user_nickname']; ?><?php echo $item['is_last']; ?></h4> <time datetime="2017-08-28" class="posts__date"><?php html(string_date_age_max($item['date_pub'], true)); ?></time> </div> </div> </div> </a> </div> <?php } ?> </div> <script src="/templates/default/js/slider/slider-min.js"></script> <script src="/templates/default/js/slider/init.js"></script> <?php } ?>