http://drupal.org/node/28673

Please reference the above ticket. It shows that when blocks are set to be on the right side, they disappear in admin. We need to setup the theme, maybe just the admin part, to make it where:

If blocks are on the right side, re-set and show them on the left side.

Please contact me if there are any questions, and post a clarification as a comment on this ticket.

Thanks,
Trae

Comments

boris mann’s picture

You don't need any PHP. The standard procedure for blocks in themes that have only one sidebar is to do something like:

print $sidebar_left
if (admin) {
  print $sidebar_right
}

And you're done.

zirafa’s picture

Pseudo logic says (correct me if I'm wrong):
If we are in the administration,
put all blocks in the left column.
If not,
put the left blocks in the left column and the right blocks in the right column.

Pseudo-code:

<div class="sidebar-left">
<!-- output regular left blocks -->
<?php print $sidebar_left; ?>
      <?php
          // output right blocks if user is in admin section 
          if(user_is_in_admin == true){
             print $sidebar_right;
             }
       ?>     
</div>

<div class="sidebar-right">
      <?php
         // output right blocks if user is NOT in admin section
         if(user_is_in_admin != true){
            print $sidebar_right;
            }
       ?>     
</div>

I can't convert the pseudo-code to working code without being able to follow the custom theme functions. Are these even necessary? You could check if you are in the admin section with a simple conditional
if(arg(0) == 'admin'). Maybe I'm missing the method to the madness :)

-Farsheed

PS:
The php in this document is coded in a very confusing manner. I would suggest changing the syntax to be as such:

If the php logic is broken up, don't use curly braces {} (line 267) but maybe instead this:

if(condition):
Show this html if the condition is true.
endif;

If you have a one line conditional print statement, use braces (line 276) instead of : and endif;

Modified line 276:
if (civicspace_is_admin()) { print(civicspace_word_split($sidebar_right)); }

It will make it much easier to read and debug this theme.

traemccombs’s picture

Assigned: Unassigned » traemccombs
Status: Active » Closed (fixed)

http://drupal.org/node/28673 <-- According to this bug, this issue is fixed.