Browse Source

Fix parent link

pull/674/head
danpros 1 year ago
parent
commit
0d0195c247
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      system/admin/views/static-pages.html.php
  2. +2
    -2
      system/htmly.php
  3. +1
    -1
      system/includes/functions.php

+ 1
- 1
system/admin/views/static-pages.html.php View File

@ -55,7 +55,7 @@ $(function() {
<span><a target="_blank" href="<?php echo $sp->url;?>"><?php echo $sp->title;?></a></span>
</div>
<div class="col-sm">
<span><a class="btn btn-primary btn-xs" href="<?php echo $sp->url;?>/edit?destination=admin/pages"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $sp->url;?>/delete?destination=admin/pages"><?php echo i18n('Delete');?></a></span>
<span><a class="btn btn-primary btn-xs" href="<?php echo $sp->url;?>/edit?destination=admin/pages/<?php echo $sp->parent;?>"><?php echo i18n('Edit');?></a> <a class="btn btn-danger btn-xs" href="<?php echo $sp->url;?>/delete?destination=admin/pages/<?php echo $sp->parent;?>"><?php echo i18n('Delete');?></a></span>
</div>
</div>
<?php endforeach;?>


+ 2
- 2
system/htmly.php View File

@ -1168,7 +1168,7 @@ get('/admin/pages/:static', function ($static)
'description' => $post->description,
'canonical' => $post->url,
'bodyclass' => 'in-page ' . strtolower($static),
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . '<a href="'. site_url() .'admin/pages">Pages</a> &#187; ' . $post->title,
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . '<a href="'. site_url() .'admin/pages">' .i18n('pages').'</a> &#187; ' . $post->title,
'p' => $post,
'static' => $post,
'type' => 'staticSubpage',
@ -3207,7 +3207,7 @@ get('/:static/edit', function ($static) {
'canonical' => site_url(),
'bodyclass' => 'edit-page',
'is_admin' => true,
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . $post->title,
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; <a href="'. site_url() .'admin/pages">' .i18n('pages').'</a> &#187; ' . $post->title,
'p' => $post,
'static' => $post,
'type' => 'staticPage',


+ 1
- 1
system/includes/functions.php View File

@ -628,7 +628,7 @@ function get_subpages($sub_pages, $page = 1, $perpage = 0)
$post->md = $v['basename'];
$post->slug = $url;
$post->parent = $fd;
$post->parent = $static;
// Get the contents and convert it to HTML
$content = file_get_contents($post->file);


Loading…
Cancel
Save