Skip to content

Commit

Permalink
Display an item's tags in the info block.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckieffer committed Jan 5, 2011
1 parent 1d2e583 commit 2e5d4a5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions modules/tag/helpers/tag_event.php
Expand Up @@ -147,4 +147,20 @@ static function add_photos_form_completed($album, $form) {
}
}
}

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;
}
}

}

0 comments on commit 2e5d4a5

Please sign in to comment.