$params = array(
'entity' => $entity,
'show_add_form' => $add_comment,
+ 'id' => "{$entity->getSubtype()}-comments",
);
$output = elgg_view('layout/elements/comments', $params);
//only display if there are commments
if ($comments_count != 0) {
$text = elgg_echo("comments") . " ($comments_count)";
- $comments_link = "<a href=\"{$blog->getURL()}#annotations\">$text</a>";
+ $comments_link = elgg_view('output/url', array(
+ 'href' => $blog->getURL() . '#blog-comments',
+ 'text' => $text,
+ ));
} else {
$comments_link = '';
}
// access is always shown.
$metadata = '<ul class="elgg-list-metadata">';
-$metadata .= '<li>' . elgg_view('output/access', array('entity' => $vars['entity'])) . '</li>';
+$metadata .= '<li>' . elgg_view('output/access', array('entity' => $blog)) . '</li>';
if (isloggedin() && $blog->getOwnerGUID() != get_loggedin_userid()) {
$likes = elgg_view_likes($blog);
if ($full) {
- $params = array(
- 'title' => $blog->title,
- 'buttons' => '',
- );
$header = elgg_view_title($blog->title);
$params = array(
*
* @uses $vars['entity'] ElggEntity
* @uses $vars['show_add_form'] Display add form or not
+ * @uses $vars['id'] Optional id for the div
*/
$show_add_form = elgg_get_array_value('show_add_form', $vars, true);
-echo '<div class="elgg-comments">';
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id =\"{$vars['id']}\"";
+}
+
+echo "<div $id class=\"elgg-comments\">";
echo list_annotations($vars['entity']->getGUID(), 'generic_comment');