ASPX templates
Version 7.x > ASPX templates > Intranet Portal Documents View modes: 
User avatar
Member
Member
marmig666-gmail - 8/9/2013 11:23:24 PM
   
Intranet Portal Documents
Hello,

The question is how I can do to edit the intranet portal section "Documents".

I commented, I want to add fields as who uploaded the ducumento and who modified it.

Thanks in advance

User avatar
Kentico Support
Kentico Support
kentico_janh - 8/10/2013 2:08:59 AM
   
RE:Intranet Portal Documents
Hello,

You need to customize the Document library control by editing the\CMSModules\DocumentLibrary\Controls\DocumentLibrary.ascx.cs and adding the DocumentModifiedByUserID, DocumentCreatedByUserID columns to the selection (columns = SqlHelperClass.MergeColumns()) and by adding these two columns to the \CMSModules\DocumentLibrary\Controls\DocumentLibrary.xml grid definition.

Best regards,
Jan Hermann

User avatar
Member
Member
marmig666-gmail - 8/10/2013 3:10:56 PM
   
RE:Intranet Portal Documents
Hello,

Thanks for responding, I have one more question with XML, how to create the columns and where?

User avatar
Member
Member
kentico_sandroj - 8/10/2013 3:46:23 PM
   
RE:Intranet Portal Documents
Hello,

You would add another column line to the XML file and specify the column name as the source, e.g.

<column source="DocumentCreatedByUserID" caption="User" wrap="false" width="100%" />

You can add that line under the first <columns> tag for testing purposes.

Regards,
Sandro

User avatar
Member
Member
marmig666-gmail - 8/10/2013 3:38:31 PM
   
RE:Intranet Portal Documents
Hi, sorry to bother so much but I know how to do in the XML but this threw me just a number but not the name, as I can do?

User avatar
Member
Member
kentico_sandroj - 8/10/2013 4:00:51 PM
   
RE:Intranet Portal Documents
Hello,

You would do a nested SQL select for the modifiedby/createdby columns, e.g.

(SELECT UserName FROM CMS_User WHERE UserID = DocumentCreatedByUserID) AS myUser

Then you would specify myUser as the source for the column in the XML file.

Regards,
Sandro

User avatar
Member
Member
marmig666-gmail - 8/10/2013 4:09:55 PM
   
RE:Intranet Portal Documents
Thank you very much for your support, problem solved