<?php if (!empty($posts)): foreach ($posts as $message): ?>
        <!-- Post -->
        <div class="blog-item">

            <!-- Post Title -->
            <h2 class="blog-item-title font-alt">
                <a href="<?= base_url() ?>news/read/<?= $message->id ?>/<?= url_title($message->title) ?>.html"><?= $message->title ?></a>
            </h2>

            <!-- Author, Categories, Comments -->
            <div class="blog-item-data">
                <a href="#"><i class="fa fa-clock-o"></i> <?= DateToIndo($message->datepost) ?></a>
                <span class="separator">&nbsp;</span>
                <a href="#"><i class="fa fa-user"></i> Amazinkprint</a>

            </div>

            <!-- Image -->
            <div class="blog-media">
                <a href="<?= base_url() ?>news/read/<?= $message->id ?>/<?= url_title($message->title) ?>.html">
                    <img src="<?= base_url() ?>assets/article/<?= $message->picture ?>" alt="<?= $message->title ?>" />
                </a>
            </div>

            <!-- Text Intro -->
            <div class="blog-item-body">
                <p>
                    <?= substr(strip_tags($message->content), 0, 200) ?>...
                </p>
            </div>

            <!-- Read More Link -->
            <div class="blog-item-foot">
                <a href="<?= base_url() ?>news/read/<?= $message->id ?>/<?= url_title($message->title) ?>.html" class="btn btn-mod btn-round  btn-small">Read More <i class="fa fa-angle-right"></i></a>
            </div>

        </div>
        <!-- End Post -->

        <?php
    endforeach;
else:
    ?>
    <p>Produk belum ada</p>
<?php endif; ?> 

<div class="loading" style="display: none;">
    <div class="content">
        <center>
            <img src="<?php echo base_url() . 'assets/loading.gif'; ?>" width="4"/>
        </center>
    </div>
</div>
<center>
    <?php echo $this->ajax_pagination->create_links(); ?>
</center>
<br/>