diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-19 01:30:07 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-19 01:30:07 +0000 |
commit | 079dca8e17b47cfee0a80f4a683bb511c8fe5505 (patch) | |
tree | 8006b60dc5719ed42ff6be0f8645bb8da637a037 | |
parent | 29a574e08252d3fe7e1e805abbb6373a2cddba54 (diff) | |
download | brdo-079dca8e17b47cfee0a80f4a683bb511c8fe5505.tar.gz brdo-079dca8e17b47cfee0a80f4a683bb511c8fe5505.tar.bz2 |
- Patch #608036 by effulgentsia: add content_attributes() variable for tpl files, so RDF can be implemented better.
-rw-r--r-- | includes/theme.inc | 7 | ||||
-rw-r--r-- | modules/block/block.tpl.php | 2 | ||||
-rw-r--r-- | modules/comment/comment.tpl.php | 2 | ||||
-rw-r--r-- | modules/field/theme/field.tpl.php | 2 | ||||
-rw-r--r-- | modules/node/node.tpl.php | 2 | ||||
-rw-r--r-- | themes/garland/block.tpl.php | 2 | ||||
-rw-r--r-- | themes/garland/comment.tpl.php | 2 | ||||
-rw-r--r-- | themes/garland/node.tpl.php | 2 |
8 files changed, 12 insertions, 9 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index e8c51d31c..bcceb3fb5 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2078,9 +2078,11 @@ function template_preprocess(&$variables, $hook) { // Initialize html class attribute for the current hook. $variables['classes_array'] = array($hook); - // Initialize attributes for the top-level template entity and its title. + // Initialize attributes for the top-level template entity and its title and + // content. $variables['attributes_array'] = array(); $variables['title_attributes_array'] = array(); + $variables['content_attributes_array'] = array(); // Set default variables that depend on the database. $variables['is_admin'] = FALSE; @@ -2107,9 +2109,10 @@ function template_process(&$variables, $hook) { // Flatten out classes. $variables['classes'] = implode(' ', $variables['classes_array']); - // Flatten out attributes and title_attributes. + // Flatten out attributes, title_attributes, and content_attributes. $variables['attributes'] = drupal_attributes($variables['attributes_array']); $variables['title_attributes'] = drupal_attributes($variables['title_attributes_array']); + $variables['content_attributes'] = drupal_attributes($variables['content_attributes_array']); } /** diff --git a/modules/block/block.tpl.php b/modules/block/block.tpl.php index a1af14707..c77d57e32 100644 --- a/modules/block/block.tpl.php +++ b/modules/block/block.tpl.php @@ -46,7 +46,7 @@ <h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2> <?php endif;?> - <div class="content"> + <div class="content"<?php print $content_attributes; ?>> <?php print $content ?> </div> </div> diff --git a/modules/comment/comment.tpl.php b/modules/comment/comment.tpl.php index 2777b3eda..ffc0c3c99 100644 --- a/modules/comment/comment.tpl.php +++ b/modules/comment/comment.tpl.php @@ -66,7 +66,7 @@ ?> </div> - <div class="content"> + <div class="content"<?php print $content_attributes; ?>> <?php // We hide the comments and links now so that we can render them later. hide($content['links']); diff --git a/modules/field/theme/field.tpl.php b/modules/field/theme/field.tpl.php index 312c4b844..a35fd7615 100644 --- a/modules/field/theme/field.tpl.php +++ b/modules/field/theme/field.tpl.php @@ -43,7 +43,7 @@ <?php if (!$label_hidden) : ?> <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>: </div> <?php endif; ?> - <div class="field-items"> + <div class="field-items"<?php print $content_attributes; ?>> <?php foreach ($items as $delta => $item) : ?> <div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?>"<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div> <?php endforeach; ?> diff --git a/modules/node/node.tpl.php b/modules/node/node.tpl.php index c05d7e8bf..ae03d400d 100644 --- a/modules/node/node.tpl.php +++ b/modules/node/node.tpl.php @@ -100,7 +100,7 @@ </div> <?php endif; ?> - <div class="content"> + <div class="content"<?php print $content_attributes; ?>> <?php // We hide the comments and links now so that we can render them later. hide($content['comments']); diff --git a/themes/garland/block.tpl.php b/themes/garland/block.tpl.php index f9879ebbe..9474ba72a 100644 --- a/themes/garland/block.tpl.php +++ b/themes/garland/block.tpl.php @@ -11,5 +11,5 @@ <h2 class="title"<?php print $title_attributes; ?>><?php print $block->subject ?></h2> <?php endif;?> - <div class="content"><?php print $content ?></div> + <div class="content"<?php print $content_attributes; ?>><?php print $content ?></div> </div> diff --git a/themes/garland/comment.tpl.php b/themes/garland/comment.tpl.php index f973e5baa..2c3e1ca28 100644 --- a/themes/garland/comment.tpl.php +++ b/themes/garland/comment.tpl.php @@ -19,7 +19,7 @@ <h3<?php print $title_attributes; ?>><?php print $title ?></h3> - <div class="content"> + <div class="content"<?php print $content_attributes; ?>> <?php hide($content['links']); print render($content); ?> <?php if ($signature): ?> <div class="clearfix"> diff --git a/themes/garland/node.tpl.php b/themes/garland/node.tpl.php index 5c02dfb9b..47f9cc974 100644 --- a/themes/garland/node.tpl.php +++ b/themes/garland/node.tpl.php @@ -17,7 +17,7 @@ <span class="submitted"><?php print $date; ?> — <?php print $name; ?></span> <?php endif; ?> - <div class="content clearfix"> + <div class="content clearfix"<?php print $content_attributes; ?>> <?php // We hide the comments and links now so that we can render them later. hide($content['comments']); |