How to check if user is in edit mode
Permalink 1 user found helpful
Hello there! I wish to a very simply task, but I couldn't find a similar topic even. So, how can I check if the user is in edit mode? I would like to include a different stylesheet if a page is viewed in edit mode. Thanks in advance!
Try using this line of code:
It's not really the user you want to check, but the page. Try this in your template:
<?php if ($c->isEditMode()) $css='edit.css'; else $css='main.css'; ?> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet($css) ?>" />
Hey guys!
Thank you for your answers, the second one was exactly what I was looking for.
Thank you for your answers, the second one was exactly what I was looking for.