From 642d07151ec5ebbf95f4ad45958bd1d3a0f05a34 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 11 Nov 2021 13:37:06 +0100 Subject: [PATCH] Fix for sub-pages #1380 --- bl-kernel/admin/views/content.php | 7 ++++--- bl-kernel/admin/views/editor.php | 8 ++++++-- bl-languages/en.json | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bl-kernel/admin/views/content.php b/bl-kernel/admin/views/content.php index 7a441335..d34635f5 100644 --- a/bl-kernel/admin/views/content.php +++ b/bl-kernel/admin/views/content.php @@ -165,11 +165,12 @@ function table($type) echo ''; foreach ($page->children() as $child) { - echo ''; + echo ''; - echo ' + echo '
- ' . ($child->title() ? $child->title() : '' . $L->g('Empty title') . ' ') . ' + ' . ($child->title() ? $child->title() : '' . $L->g('Empty title') . ' ') . ' +
' . ($page->title() ? $page->title() : $L->g('Empty title')) . '
' . $L->g('View') . ' diff --git a/bl-kernel/admin/views/editor.php b/bl-kernel/admin/views/editor.php index b8da1e32..aacee780 100644 --- a/bl-kernel/admin/views/editor.php +++ b/bl-kernel/admin/views/editor.php @@ -60,8 +60,8 @@ // Save the current page // This function set the global variable "_pageKey" function savePage(args = []) { - logs('Saving page.'); + console.log(_pageKey); if (_pageKey == null) { logs('Error, page not created.'); showAlertError("Error, page not created."); @@ -69,6 +69,7 @@ } args['pageKey'] = _pageKey; + args['parent'] = $('#parent').val(); api.savePage(args).then(function(response) { if (response.status == 0) { logs('Page saved. Old key: ' + _pageKey + ' / New key: ' + response.data.key); @@ -405,7 +406,7 @@