]> git.bts.cx Git - cx.git/blobdiff - cx/templates/public/pages/post.php
Better paths for images and editor links
[cx.git] / cx / templates / public / pages / post.php
index 4b7993d9b3bf5f68a977d04e8ae704113182bf4e..0a8517618b767b1530415f828a075d47b1ab110c 100644 (file)
@@ -1,12 +1,12 @@
 <?php $post = cx_posts_find_post($post_id); ?>
 <?php $post_metadata = $post->get_metadata(); ?>
-<?php $post_permalink = '/' . date('Y', $post->date) . '/' . date('m', $post->date) . '/' . $post->slug; ?>
+<?php $post_permalink = $post->get_permalink_path(); ?>
 <?php cx_template_base('base', ['cx_post_title' => $post->title, 'cx_post_meta' => $post_metadata, 'cx_post_permalink' => $post_permalink]); ?>
 <main>
 <?php if ($post): ?>
        <article>
                <h1><a href="<?= cx_url($post_permalink) ?>"><?= $post->title ?></a></h1>
-               <p class="updated"><?= date('l, F jS, Y',$post->date) ?></p>
+               <?php if ($post->is_page == false): ?><p class="updated"><?= date('l, F jS, Y',$post->date) ?></p><?php endif; ?>
                <?= $post->html_content ?>
        </article>
 <?php else: ?>