Did anybodey ever use block-left.tpl.php?

could someone post me an example on how to use it?

The page http://drupal.org/node/104319 is not helping me how to use it.

Can I copy block.tpl.php -> block-left.tpl.php? Do I need to change some code inside?

I need it for an idea to make the layout of the blocks in the left sidebar different than the blocks in the right sidebar.

There is very little in depth help on this topic.

Best regards,
Michiel

Comments

zeta ζ’s picture

Yes you can copy the file. If you don’t change it, you won’t see any difference.

I think you need block.tpl.php to exist in the same directory as block-left.tpl.php for them both to be recognised.
___________________
It’s in the detaιls…

cryppy’s picture

What do I need to change?

Do I need to change:

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes; ?>"><div class="block-inner">

to:

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes; ?>"><div class="block-left">
zeta ζ’s picture

No, I think you want to keep block-inner. See what class="block <?php print $block_classes; ?>" is giving you. You don’t need to change anything: just depends on what you want to be different.

Do you really need a different layout as opposed to style? You should find that the left region will have an id (or at least a class) that you can use to style only the blocks in that region – #sidebar-left .block-user { will affect the user block only when it is in the left sidebar.
___________________
It’s in the detaιls…

charlie-s’s picture

I know this is a little old but it's #1 on google right now for "drupal block-left.tpl.php"

This can be very handy for doing advanced theming, i.e. you have blocks on the left that have different visual elements than right blocks. This could be images / separators / block-output etc that require more than some CSS (altho both are possible IMO).