Hiding Side Content in Edit mode

Aminto - June 9, 2009 - 13:54
Project:Side Content
Version:6.x-2.0-beta2
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:hide in edit mode, side content, sidecontent
Description

Hi,

I've got Side Content enabled on a couple of sites, however am having to use a different theme when in Edit mode, as the Side Content doesn't disappear, this means that I have a very narrow window for editing the text, which using the FCK Editor means I need to scroll left and right to read a single line.

If the Side Content disappeared (in the same way as the main 'Body' field disappears), when you're in Edit mode, this would be a really big help!

Thanks!

#1

knstephens - August 11, 2009 - 15:27

You can check if a user is logged in by checking the $logged_in variable. If it is set to 1 then a user is logged in.

You can then opt to show content only when no-one is logged in with the following code:

<?php
if ($logged_in != 1)
    {
?>

Your HTML here....

<?php
   
}
;
?>

Hope this helps!

#2

Aminto - September 23, 2009 - 04:22
Title:Hiding Side Content when in Edit mode» Hiding Side Content in Edit mode
Status:active» fixed

Hi knstephens, Thanks for your suggestion.

I've actually now found a simple solution to this problem, which is that on the blocks page under the side content block (e.g. admin/build/block/configure/sidecontent/0) I select:

'show on every page except the listed pages'

Then add:

node/*/edit

This means whenever I'm editing a page, it doesn't show this block, but I still see the contents when I'm in view mode. This could be handy in other situations too if it helps to remove blocks so you have a wider screen or less other components when editing a page.

#3

dman - September 23, 2009 - 04:23

That's actually a really handy tip. Could be put in the handbook somewhere!

#4

System Message - October 7, 2009 - 04:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.