Portal Engine
Version 2.x > Portal Engine > Show Last Updated/Modified Details View modes: 
User avatar
Member
Member
andrew.newton@mater.org.au - 6/14/2007 9:06:54 AM
   
Show Last Updated/Modified Details
Does anyone know an easy way to show the "Last Modified" details about a page?

If you go to the page "Properties" tab, under "General" it shows when it was last modified and who by. I want to show that on each page, for example by adding a web part which automatically shows that information.

Any ideas the best way to do this?

User avatar
Kentico Product Management
Kentico Product Management
kentico_karolj - 7/13/2007 4:19:44 PM
   
RE:Show Last Updated/Modified Details
Hi Andrew,

Please follow steps described bellow to achieve your goal:

1) Create new web part as described in http://www.kentico.com/docs/devguide/developing_web_parts.htm. Insert label to this web part. We will use it to display date value.

2) In code behind insert following line into 'Page_Load' method:

label.Text= CMS.GlobalHelper.ValidationHelper.GetString(CMS.CMSHelper.CMSContext.CurrentDocument.DataRow[''DocumentModifiedWhen''], '' '');
When you insert this web part on master page it will display date and time of last modification concerning current site.

Best Regards,
Karol Jarkovsky

User avatar
Member
Member
Rrij - 10/17/2008 9:54:28 AM
   
RE:Show Last Updated/Modified Details
I only want to show date not the time, but the "d" isn't working for me. How to archive this?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/17/2008 3:32:16 PM
   
RE:Show Last Updated/Modified Details
Hi,

you could use:

Label.Text= CMS.GlobalHelper.ValidationHelper.GetString(CMS.CMSHelper.CMSContext.CurrentDocument.DataRow["DocumentModifiedWhen"], " ").Split(' ')[0];

Best regards,
Helena Grulichova

User avatar
Member
Member
romeo_osma-yahoo - 8/8/2011 2:08:03 AM
   
RE:Show Last Updated/Modified Details
Do you have an inline control version for this?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 8/8/2011 3:38:11 AM
   
RE:Show Last Updated/Modified Details
Hi,

you could insert the code into the inline control:

http://devnet.kentico.com/docs/devguide/how_to_develop_inline_controls.htm

Best regards,
Ivana Tomanickova

User avatar
Member
Member
okorsal-cou.on - 11/1/2011 9:13:35 AM
   
RE:Show Last Updated/Modified Details
In the link above to create the web part. Do we have to use: Visual Studio (or Visual Web Developer) to create web parts? Is there an alternative software we can use?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 11/9/2011 5:41:25 AM
   
RE:Show Last Updated/Modified Details
Hello.

Theoretically, you don’t need Visual Studio for that, you can use even your Notepad. However, Visual Studio in Express edition is for free, so I would recommend you to use that. If you want some free alternative, please google for "asp.net visual studio alternative." Thank you.

Best Regards,
Radek Macalik