summaryrefslogtreecommitdiff
path: root/modules/tag
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2011-01-04 19:52:25 -0700
committerChad Kieffer <ckieffer@gmail.com>2011-01-04 19:52:25 -0700
commit2e5d4a59b119fecce4f647eaa49565b024678cf9 (patch)
tree33e0d2a616a3e0e7f2f3427a3ab93746d514126d /modules/tag
parent1d2e583c3177aa498abd70dde442d767efc4e99e (diff)
Display an item's tags in the info block.
Diffstat (limited to 'modules/tag')
-rw-r--r--modules/tag/helpers/tag_event.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index 829089c4..78fe7058 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -147,4 +147,20 @@ class tag_event_Core {
}
}
}
+
+ static function info_block_metadata($block, $item) {
+ $tags = array();
+ foreach (tag::item_tags($item) as $tag) {
+ $tags[] = "<a href=\"" . url::site("/tag/{$tag->name}") . "\">$tag->name</a>";
+ }
+ if (count($tags)) {
+ $info = $block->content->metadata;
+ $info["tags"] = array(
+ "label" => t("Tags:"),
+ "value" => implode(", ", $tags)
+ );
+ $block->content->metadata = $info;
+ }
+ }
+
}