If you want to display the URL address of a blog post which is related to a comment in
CMS Desk -> My desk -> Blogs -> Comments, please open the
~\CMSModules\Blogs\Tools\Comments_List.xml file and add an extra column into it:
<column source="CommentPostDocumentID" externalsourcename="PostDocument" caption="$general.url$" wrap="false">
</column>
The comment grid is now prepared to show URLs, but you need to fill that new column with the correct data, so please edit the
~\CMSModules\Blogs\Controls\Blogs_Comments.ascx.cs file and update the line 233:
gridComments.Columns = "CommentID, CommentDate, CommentApproved, CommentUserName, CommentText, CommentIsSpam, CommentPostDocumentID";
Finally you can get a document’s URL from its ID by adding an extra case into the
gridComments_OnExternalDataBound() method in the same file:
case "postdocument":
return CMS.CMSHelper.CMSContext.GetDocumentUrl(ValidationHelper.GetInteger(parameter, 0));
-jh-