How to display author

Topics: Customizing Orchard, General
Jul 27, 2011 at 10:39 PM

Content types with Common part display time stamps.  For example, a blog post shows time stamp at its header.  How can the author of the content be displayed too?

The reason for this question is that different authors may post under the same blog, or create posts of the same content type.

Coordinator
Jul 27, 2011 at 10:44 PM

You can discover such things by using the Shape Tracing feature in the Designer Tools module. In the model tag, you can dig into what's available and the top line shows you the syntax that you can copy and paste into your template. In this case, @Model.ContentPart.Owner.UserName will do this in Parts/Common.Metadata.cshtml.

Jul 27, 2011 at 10:58 PM

It works like a charm!  Thanks a lot!