<?php
/**
 * Copyright © 2015 PlazaThemes.com. All rights reserved.

 * @author PlazaThemes Team <contact@plazathemes.com>
 */
?>
<?php
/**
 * Blog sidebar recent posts template
 *
 * @var $block \Plazathemes\Blog\Block\Sidebar\Recent
 */
?>

<?php
	$_postCollection = $block->getPostCollection();
?>
<?php if ($_postCollection->count()) { ?>
<div class="widget block block-recent-posts" data-bind="scope: 'recemt-posts'">
    <div class="block-title">
        <strong><?php echo __('Recent Posts') ?></strong>
    </div>
    <div class="block-content">
    	<?php foreach ($_postCollection as $_post) { ?>
            <div class="item">
                <a class="post-item-link"
                   href="<?php echo $_post->getPostUrl() ?>">
                    <?php echo $block->escapeHtml($_post->getTitle()) ?>
                </a>
            </div>

        <?php } ?>
    </div>
</div>
<?php } ?>