summaryrefslogtreecommitdiff
path: root/themes/bartik/template.php
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-06 19:34:33 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-06 19:34:33 +0000
commit51e5d3ae2764c9b98505480a1f3ca0e7b0e5621d (patch)
tree9f21a8fb7e13026d8e2b40cc6aaac41d76bc9118 /themes/bartik/template.php
parent4fcae8068f4d843856dc75054115c0996189bbd2 (diff)
downloadbrdo-51e5d3ae2764c9b98505480a1f3ca0e7b0e5621d.tar.gz
brdo-51e5d3ae2764c9b98505480a1f3ca0e7b0e5621d.tar.bz2
#819996 by amateescu, Jeff Burnz, tim.plunkett, Hoople, bleen18: Fix taxonomy term displays in Bartik.
Diffstat (limited to 'themes/bartik/template.php')
-rw-r--r--themes/bartik/template.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/themes/bartik/template.php b/themes/bartik/template.php
index d60aeb6a5..f3bc93b27 100644
--- a/themes/bartik/template.php
+++ b/themes/bartik/template.php
@@ -128,3 +128,27 @@ function bartik_preprocess_block(&$variables) {
function bartik_menu_tree($variables) {
return '<ul class="menu clearfix">' . $variables['tree'] . '</ul>';
}
+
+/**
+ * Implements theme_field__field_type().
+ */
+function bartik_field__taxonomy_term_reference($variables) {
+ $output = '';
+
+ // Render the label, if it's not hidden.
+ if (!$variables['label_hidden']) {
+ $output .= '<h3 class="field-label">' . $variables['label'] . ': </h3>';
+ }
+
+ // Render the items.
+ $output .= ($variables['element']['#label_display'] == 'inline') ? '<ul class="links inline">' : '<ul class="links">';
+ foreach ($variables['items'] as $delta => $item) {
+ $output .= '<li class="taxonomy-term-reference-' . $delta . '">' . drupal_render($item) . '</li>';
+ }
+ $output .= '</ul>';
+
+ // Render the top-level DIV.
+ $output = '<div class="' . $variables['classes'] . (!in_array('clearfix', $variables['classes_array']) ? ' clearfix' : '') . '">' . $output . '</div>';
+
+ return $output;
+}