mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 12:17:42 +02:00
Pages Plugin: Update Index Action.
This commit is contained in:
@@ -441,14 +441,19 @@
|
|||||||
// Its mean that you can add your own actions for this plugin
|
// Its mean that you can add your own actions for this plugin
|
||||||
Action::run('admin_pages_extra_actions');
|
Action::run('admin_pages_extra_actions');
|
||||||
|
|
||||||
} else { // Load main template
|
} else {
|
||||||
|
|
||||||
|
// Index action
|
||||||
|
// -------------------------------------
|
||||||
|
|
||||||
|
// Init vars
|
||||||
|
$pages_array = array();
|
||||||
|
$count = 0;
|
||||||
|
|
||||||
|
// Get pages
|
||||||
$pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'parent'));
|
$pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'parent'));
|
||||||
|
|
||||||
$pages_array = array();
|
// Loop
|
||||||
|
|
||||||
$count = 0;
|
|
||||||
foreach ($pages_list as $page) {
|
foreach ($pages_list as $page) {
|
||||||
|
|
||||||
$pages_array[$count]['title'] = $page['title'];
|
$pages_array[$count]['title'] = $page['title'];
|
||||||
@@ -465,6 +470,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($c_p != '') {
|
if ($c_p != '') {
|
||||||
|
|
||||||
$_page = $pages->select('[slug="'.$page['parent'].'"]', null);
|
$_page = $pages->select('[slug="'.$page['parent'].'"]', null);
|
||||||
|
|
||||||
if (isset($_page['title'])) {
|
if (isset($_page['title'])) {
|
||||||
@@ -472,10 +478,15 @@
|
|||||||
} else {
|
} else {
|
||||||
$_title = '';
|
$_title = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$pages_array[$count]['sort'] = $_title . ' ' . $page['title'];
|
$pages_array[$count]['sort'] = $_title . ' ' . $page['title'];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$pages_array[$count]['sort'] = $page['title'];
|
$pages_array[$count]['sort'] = $page['title'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$_title = '';
|
$_title = '';
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user