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-
 
0 ratings
Sitemap | Content Management System | E-commerce Software | Social Networking Software | Intranet | Online Marketing Solution | Copyright © 2004-2013 Kentico Software | Powered by Kentico CMS