In block.tpl.php, the code:
<?php print $content_processed; ?> <?php print render($title_suffix); ?>
is incorrect. They should be in the opposite order.
<?phpprint render($title_suffix); ?>
This is closing div
No, it's not.
According to the documentation in modules/block/block.tpl.php,
* - $title_prefix (array): An array containing additional output populated by * modules, intended to be displayed in front of the main title tag that * appears in the template. * - $title_suffix (array): An array containing additional output populated by * modules, intended to be displayed after the main title tag that appears in * the template.
And the actual code there is:
<?php print render($title_prefix); ?><?php if ($block->subject): ?> <h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2><?php endif;?> <?php print render($title_suffix); ?> <div class="content"<?php print $content_attributes; ?>> <?php print $content ?> </div>
The suffix is meant to come right after the title, not after the content of the block.
Yes, I did have trouble with this, in a theme that set $title_suffix. It came out in the wrong place.
I agree, those two lines need to be swapped. Patch attached.
Somehow I totally overlooked this issue and patches.
Technically no change is needed. The only thing output by suffix (in Drupal core) is contextual links. I personally don't know of another module that uses this variable, so it's safe where they are. Really this is a feature request, there is no hard technical reason why I have to follow the documentation, and frankly I consider it to be rather overstating how we can or should use this variable. Its just not up to Core to tell me where to output contextual links, that is a theming decision.
If someone can show me a bug I'm all ears, otherwise I would prefer to leave this alone, mainly because there are so many existing AT installations and someone might have used this variable in their site (custom module etc), so could be a little dangerous to move it at this stage.
I am setting this won't fix for D7 Adaptivetheme due to the above reasons.
Drupal is a registered trademark of Dries Buytaert.