Edit single page contents with edit mode
Permalink
I've got a single page to list all the events happening in my club. I want to have a nice form to add or edit those events in edit mode (that's why concrete's good -- you don't have to go to dashboard to edit something, do you?)
For blocks it's simple, there's edit.php and controller handles that.
But how can I make my single page controller know, that the page is in edit mode?
For blocks it's simple, there's edit.php and controller handles that.
But how can I make my single page controller know, that the page is in edit mode?
You know - I knew that was possible, but I hadn't thought of doing it that way... I've always put my forms on a new page in the dashboard... But that's given me some ideas! Not a stupid question at all! Thanks for asking!
Jon
Jon
I'm really glad my little struggle helped someone else too :)
Here it is:
<?php global $c; if ($c->isEditMode()) { ?> Do something here <?php } ?>
I'm putting that to my page and showing the forms when page is in edit mode. Otherwise, I show the usual info.