mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 01:57:55 +08:00
Adding dynamic Content property to the Content Item class for easily accessing Parts and Fields. Thanks Sébastien! :)
This commit is contained in:
@@ -15,6 +15,8 @@ namespace Orchard.ContentManagement {
|
||||
|
||||
ContentItem IContent.ContentItem { get { return this; } }
|
||||
|
||||
public dynamic Content { get { return (dynamic)this; } }
|
||||
|
||||
public int Id { get { return Record == null ? 0 : Record.Id; } }
|
||||
public int Version { get { return VersionRecord == null ? 0 : VersionRecord.Number; } }
|
||||
|
||||
|
Reference in New Issue
Block a user