<?php if(! empty($breadcrumbs)): ?>
    <div class="breadcrumbs">
        <div class="container">
            <h1 class="pull-left">
                <?php if(isset($contentPage)): ?>
                    <?php echo e($contentPage->cms_cpg_name); ?>

                <?php elseif(isset($gallery)): ?>
                    <?php echo e($gallery->cms_gal_name); ?>

                <?php elseif(isset($article) && ! isset($articles)): ?>
                    <?php echo e($article->cms_art_name); ?>

                <?php elseif(isset($category)): ?>
                    <?php echo e($category->cms_artcat_name); ?>

                <?php else: ?>
                    <?php echo e(end($breadcrumbs)->getAttribute('core_smi_name') ? end($breadcrumbs)->getAttribute('core_smi_name') : end($breadcrumbs)->getAttribute('name')); ?>

                <?php endif; ?>
            </h1>

            <ul class="pull-right breadcrumb">
                <?php foreach($breadcrumbs as $item): ?>
                        <?php if ( ! (end($breadcrumbs) == $item)): ?>
                            <li>
                                <a href="<?php echo ($item->getUrl() ? $item->getUrl() : '#'); ?>"><?php echo e($item->getAttribute('core_smi_name') ? $item->getAttribute('core_smi_name') : $item->getAttribute('name')); ?></a>
                            </li>
                        <?php else: ?>
                            <li class="active">
                                <?php echo e($item->getAttribute('core_smi_name') ? $item->getAttribute('core_smi_name') : $item->getAttribute('name')); ?>

                            </li>
                        <?php endif; ?>
                <?php endforeach; ?>
            </ul>
        </div><!--/container-->
    </div>
<?php endif; ?>