]> git.bts.cx Git - cx.git/blobdiff - cx/templates/admin/pages/main.php
Use the correct file request call
[cx.git] / cx / templates / admin / pages / main.php
index c0da49a4d425560a027fc85bee915d9577232c11..f9ab483143643c2627ae0a89aa3abc360e719995 100644 (file)
@@ -4,20 +4,20 @@
 <table>
 <?php foreach (cx_posts_get(include_drafts: true) as $post): ?>
 <tr>
- <td class="fill"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id); ?>"><?= $post->title ?></a></td>
- <td class="hug"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id); ?>">Edit</a></td>
- <td class="hug"><a href="<?= cx_url_admin('/posts/delete?id=' . $post->id); ?>">Delete</a></td>
+ <td class="fill"><a href="<?= cx_url_site($post->get_permalink_path()) ?>"><?= $post->title ?></a></td>
+ <td class="hug"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id) ?>">Edit</a></td>
+ <td class="hug"><a href="<?= cx_url_admin('/posts/delete?id=' . $post->id) ?>">Delete</a></td>
 </tr>
 <?php endforeach; ?>
 </table>
 
 <h2>Pages</h2>
 <table>
-<?php foreach (cx_pages_get(include_drafts: true) as $post): ?>
+<?php foreach (cx_pages_get(navigation_only: false, include_drafts: true) as $post): ?>
 <tr>
- <td class="fill"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id); ?>"><?= $post->title ?></a></td>
- <td class="hug"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id); ?>">Edit</a></td>
- <td class="hug"><a href="<?= cx_url_admin('/posts/delete?id=' . $post->id); ?>">Delete</a></td>
+ <td class="fill"><a href="<?= cx_url_site($post->get_permalink_path()) ?>"><?= $post->title ?></a></td>
+ <td class="hug"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id) ?>">Edit</a></td>
+ <td class="hug"><a href="<?= cx_url_admin('/posts/delete?id=' . $post->id) ?>">Delete</a></td>
 </tr>
 <?php endforeach; ?>
 </table>
@@ -26,9 +26,9 @@
 <table>
 <?php foreach (cx_images_get() as $image): ?>
 <tr>
- <td class="fill"><a href="<?= $image->url ?>"><?= $image->url ?></a></td>
- <td class="hug"><a href="<?= cx_url_admin('/images/edit?id=' . $image->id); ?>">Edit</a></td>
- <td class="hug"><a href="<?= cx_url_admin('/images/delete?id=' . $image->id); ?>">Delete</a></td>
+ <td class="fill"><a href="<?= cx_url_site($image->get_permalink_path()) ?>"><?= $image->url ?></a></td>
+ <td class="hug"><a href="<?= cx_url_admin('/images/edit?id=' . $image->id) ?>">Edit</a></td>
+ <td class="hug"><a href="<?= cx_url_admin('/images/delete?id=' . $image->id) ?>">Delete</a></td>
 </tr>
 <?php endforeach; ?>
 </table>