<?php Block::put('breadcrumb') ?>
    <ul>
        <li><a href="<?= Backend::url('dynamedia/posts/categories') ?>">
                <?= e(trans('dynamedia.posts::lang.common.labels.categories'))?>
            </a></li>
        <li>
            <?= e(trans('dynamedia.posts::lang.common.titles.previewing', ['name' => $this->formGetModel()->name]))?>
        </li>
    </ul>
<?php Block::endPut() ?>

<?php if (!$this->fatalError): ?>

    <div class="form-preview">
        <?php if (Dynamedia\Posts\Classes\Acl\AccessControl::userCanViewCategories(BackendAuth::getUser())): ?>
        <?= $this->formRenderPreview() ?>
        <?php endif ?>
    </div>

<?php else: ?>

    <p class="flash-message static error"><?= e($this->fatalError) ?></p>
    <p><a href="<?= Backend::url('dynamedia/posts/categories') ?>" class="btn btn-default">
            <?= e(trans('backend::lang.form.return_to_list'))?>
        </a></p>

<?php endif ?>
