From: cash Date: Fri, 24 Dec 2010 13:52:42 +0000 (+0000) Subject: supporting id for comments for in page links X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f6045914d7488c43cd7761ddaded55b3791ae950;p=lorea%2Felgg.git supporting id for comments for in page links git-svn-id: http://code.elgg.org/elgg/trunk@7719 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/engine/lib/views.php b/engine/lib/views.php index 5214e96c3..1e309f5bd 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -981,6 +981,7 @@ function elgg_view_comments($entity, $add_comment = true) { $params = array( 'entity' => $entity, 'show_add_form' => $add_comment, + 'id' => "{$entity->getSubtype()}-comments", ); $output = elgg_view('layout/elements/comments', $params); diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index 199a7c822..639031113 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -37,7 +37,10 @@ if ($blog->comments_on != 'Off') { //only display if there are commments if ($comments_count != 0) { $text = elgg_echo("comments") . " ($comments_count)"; - $comments_link = "getURL()}#annotations\">$text"; + $comments_link = elgg_view('output/url', array( + 'href' => $blog->getURL() . '#blog-comments', + 'text' => $text, + )); } else { $comments_link = ''; } @@ -47,7 +50,7 @@ if ($blog->comments_on != 'Off') { // access is always shown. $metadata = '