Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291890

Change block "label" so that it's called a title like everything else in the template file (and all other template files)

$
0
0

Problem/Motivation

Look at this code, it's an inconsistent mess!

<?php if (isset($block_html_id)): ?>
  <div id="<?php print $block_html_id; ?>"<?php print $attributes; ?>>
  <?php else: ?>
  <div <?php print $attributes; ?>>
  <?php endif; ?>

  <?php print render($title_prefix); ?>
  <?php if ($block->label): ?>
  <h2<?php print $title_attributes; ?>><?php print $block->label; ?></h2>
  <?php endif;?>
  <?php print render($title_suffix); ?>

  <div<?php print $content_attributes; ?>>
    <?php print $content ?>
  </div>
</div>

Proposed resolution

Easy fix: The variables printed in a template file, for a title of a block, a node, a comment, whatever, should to be called titles.
Harder fix: I think this is a mistake (and will be a lot of work) but alternatively, we could rename everything else in these templates that contains "title" into a label. label_prefix, label_suffix, label_attributes.

Remaining tasks

- make a decision
- make Drupal consistent

User interface changes

- none

API changes

- none

#1591806: Change block "subject" so that it's called a (admin_)label like everything else on the theme layer
#1591830: Change comment "subject" so that it's called a title like everything else in the template file (and all other template files)
#1825216: Name variables consistently across all templates (preprocess)
#1939234: Change node "label" so that it's called a title like everything else in the template file (and all other template files)


Viewing all articles
Browse latest Browse all 291890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>