Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In block.tpl.php, the code:
<?php print $content_processed; ?>
<?php print render($title_suffix); ?>
is incorrect. They should be in the opposite order.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1990530-block-tpl-fix-title-suffix.diff | 462 bytes | znerol |
Comments
Comment #1
aliyakhan CreditAttribution: aliyakhan commentedprint render($title_suffix);
This is closing div for the titles added by module to wrap the content. Did you face any issues regarding same?Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedNo, it's not.
According to the documentation in modules/block/block.tpl.php,
And the actual code there is:
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.
Comment #3
znerol CreditAttribution: znerol commentedI agree, those two lines need to be swapped. Patch attached.
Comment #4
Jeff Burnz CreditAttribution: Jeff Burnz commentedSomehow 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.
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedI am setting this won't fix for D7 Adaptivetheme due to the above reasons.