How to display creator, last updated by, create date and update date in content item

I need the following to be automatically populated and displayed in a content item as read-only fields.

Please advise how I can include those fields in the content type or alternate ways.

Created timestamp,
Created by (show login id),
Last updated timestamp,
Last updated loginid and
Version#(an auto-incremented counter of publish).

thanks.

All of these items should be available to you through the $sys.item variable. So for example ‘created by’ would be $sys.item.getProperty(‘rx:sys_contentcreatedby’).String. That should print out to the page with the correct information. For other ‘properties’ you can use the Query Debugger to find out what the properties are.

The query debugger idea really helped. Thanks !

I can display the field in the assembly view - for example: #field(“rx:sys_contentcreatedby”).
But it gives me an error at the bottom of the browser page:

FATAL exception raised: 'this.objId.getFieldLabel()' is null or not an object 

and consequently the left panel is empty (the one with the nodes tree).

I think it is because I have NOT added sys_contentcreatedby as a field in my content type in the workbench. But I am unable to do so since under ‘Shared and System fields’ under System, I don’t see the field at all.

So why isnt the field sys_contentcreatedby listed under the System fields in the workbench ?

I think that field is added to every content type that is created. When using $sys.item you do not have to not surround it with the “#field” context. You should just use $sys.item.getProperty(‘rx:sys_contentcreatedby’).String. I am pretty sure that when you use #field, it has to be for an item that is a field you can fill out on the content editing screen.

You are correct. For system fields we should not use #field. It works fine now in the assembly view.

But I need to display the field in the content editor window as well.

So the big question is, why don’t I see the sys_contentcreatedby field listed under ‘System’ Fields in the workbench when I try to include it to a content type ?
Likewise, I don’t see sys_contentcreateddate, sys_contentlastmodifier etc. The System node has got fields like sys_communityid, sys_contentexpirydate etc. but not the above fields that I want.

I’m guessing the reason these are not available in Workbench is because these fields are managed completely by Percussion in specific way, and giving the ability to have these updated in any way outside of that (which adding it in Workbench would effectively enable) could break the system.

Showing them on the Content Editor window is going to be a little tricky since it’s all XSLT-based. I’m curious, why do you want to show these on the Content Editor window since they cannot be changed by the author? Do they inform the content-entry process in some way?

[QUOTE=dshenoy;18923]You are correct. For system fields we should not use #field. It works fine now in the assembly view.

But I need to display the field in the content editor window as well.

So the big question is, why don’t I see the sys_contentcreatedby field listed under ‘System’ Fields in the workbench when I try to include it to a content type ?
Likewise, I don’t see sys_contentcreateddate, sys_contentlastmodifier etc. The System node has got fields like sys_communityid, sys_contentexpirydate etc. but not the above fields that I want.[/QUOTE]