Does not work anymore, ( It forces the deletion of all subpages )
$page->delete(true)
// $page->delete($force = false)
Does not work anymore, ( It forces the deletion of all subpages )
$page->delete(true)
// $page->delete($force = false)
What exactly does not work?
hmm maybe I got it wrong, in earlier releases of Kirby I was able to delete the page(folder) with all it´s content, (all index/subpages) force set to “true”, but now i can not do that if the page(folder) contains other pages(folders)…
No, it should exactly work like that. I just tested this by putting the following code into the projects.php template and calling the projects page
<?php
try {
page('projects')->delete(true);
echo 'The page has been deleted';
} catch(Exception $e) {
echo $e->getMessage();
}
?>
with the result that the complete projects folder was deleted …
oh crap, thanks m8, then I did something wrong… I have the delete function in an hook, will investigate later, thanks !!