I would like to switch the feature blocks display from the right to the left side. I have played with the code but am apparently too dense to make it happen.

<div id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>" class="block<?php print " block-$block->module"; ?><?php print ($block->region == 1 || $block->region == 'right') ? ' featurebox': ''; ?>">
  <?php if ($block->region != 0 && $block->region != 'left' && $block->subject): ?>
  <h4><?php print $block->subject; ?></h4>
  <?php endif; ?>
  <?php print $block->content; ?>
</div>

I have been messing with the block code, which I assume is where the change is made. I tried basically switching;
<?php print ($block->region == 1 || $block->region == 'right') ? ' featurebox': ''; ?>">

with:

<?php if ($block->region != 0 && $block->region != 'left' && $block->subject): ?>

I didn't move the print statement or the if statement just the contents of each. I also just tried inverting the comparators.

Anyway, any assistance or clues would be greatly appreciated.

Thanks,

gtoddv

Comments

gtoddv’s picture

Title: Swith Feature Block Side » Switch Feature Block Side

Any chance of a little help? I am under a deadline. I understand if you are too busy, just thought I would ask.

Thanks.

yched’s picture

See http://www.mollio.org/ :
One of the strength of mollio template is that it comes in several flavours (left bar, right bar, both...), all included in the css file.

The way rkerr has implemented this layout 'richness' in his port to Drupal is rather elegant, if I may say so...

In other words, rely on the above url and try messing with the following code at the beginning of page.tpl.php

switch ($layout) {
  case 'both':
    $mollio_layout = 'type-c';
    break;
  case 'left':
    $mollio_layout = 'type-b';
    break;
  case 'right':
    $mollio_layout = 'type-d';
    break;
  case 'none':
  default:
    $mollio_layout = 'type-a';
    break;
}

Hope this helps :-)

gtoddv’s picture

Thanks for the response!

As I understand that portion of the code, it is the selection between having type:

1. Three columns
2. Two columns - left navigation
3. Two columns - right navigation
4. Single column

All we are doing there is determining which layout style to use. As far as what side something appears on, we can do that in the block setup. The problem lies in the background image that is shown for 'feature blocks'. That appears to be controlled by the code in my original post. I want that background to be shown on the left side so I can move the navigation over to the right. The stylesheet does not appear to be helpful.

Thanks though for taking the time to respond, I do appreciate it, you did get me to dig a little bit deeper. Still no resolution, but who knows, I might just bump into something.

gtoddv

rkerr’s picture

Status: Active » Closed (won't fix)

I suppose you could change the value of $type for the case of "both" sidebars being enabled. And then configure the blocks in Drupal to be on left & right sides.. or switch the $left_sidebar / $right_sidebar printing in page.tpl.php.