Added Tabs to edit page
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use Nickyeoman\Validation;
|
||||
$v = new Nickyeoman\Validation\Validate();
|
||||
use Novaconium\Services\TagManager; // Autoloads automatically
|
||||
|
||||
$url_error = '/novaconium/page/edit/' . $post->get('id'); // fallback for errors
|
||||
|
||||
@@ -34,6 +35,7 @@ $notes = $_POST['notes'] ?? '';
|
||||
$draft = !empty($post->get('draft')) ? 1 : 0;
|
||||
$changefreq = $_POST['changefreq'] ?? 'monthly';
|
||||
$priority = $_POST['priority'] ?? 0.0;
|
||||
$tags_json = $_POST['tags_json'] ?? '[]';
|
||||
|
||||
// Validate required fields
|
||||
if (empty($title) || empty($slug) || empty($body)) {
|
||||
@@ -64,6 +66,19 @@ try {
|
||||
}
|
||||
|
||||
if (!empty($id) && !$newpage) {
|
||||
|
||||
/** Work in Progress
|
||||
// Delete old tag links for this page (cleanup)
|
||||
$deleteQuery = <<<EOSQL
|
||||
DELETE FROM page_tags WHERE page_id = ?
|
||||
EOSQL;
|
||||
$db->query($deleteQuery, [$id]);
|
||||
|
||||
$tagManager = new TagManager();
|
||||
|
||||
dd($tags_json);
|
||||
**/
|
||||
|
||||
// Update existing page
|
||||
$query = "UPDATE `pages` SET
|
||||
`title` = ?, `heading` = ?, `description` = ?, `keywords` = ?, `author` = ?,
|
||||
|
||||
Reference in New Issue
Block a user