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?

 
lunatik replied on at Permalink Best Answer Reply
Well, sorry for that stupid question -- I've got an answer.
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.
jbx replied on at Permalink Reply
jbx
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
lunatik replied on at Permalink Reply
I'm really glad my little struggle helped someone else too :)