File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed
BlogEngine/BlogEngine.Core Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 5
5
using System . Linq ;
6
6
7
7
using BlogEngine . Core . Providers ;
8
-
8
+ using Data . Models ;
9
9
/// <summary>
10
10
/// A page is much like a post, but is not part of the
11
11
/// blog chronology and is more static in nature.
@@ -702,5 +702,33 @@ protected override void ValidationRules()
702
702
}
703
703
704
704
#endregion
705
+
706
+ #region Custom Fields
707
+
708
+ /// <summary>
709
+ /// Custom fields
710
+ /// </summary>
711
+ public Dictionary < String , CustomField > CustomFields
712
+ {
713
+ get
714
+ {
715
+ var pageFields = BlogService . Provider . FillCustomFields ( ) . Where ( f =>
716
+ f . CustomType == "PAGE" &&
717
+ f . ObjectId == this . Id . ToString ( ) ) . ToList ( ) ;
718
+
719
+ if ( pageFields == null || pageFields . Count < 1 )
720
+ return null ;
721
+
722
+ var fields = new Dictionary < String , CustomField > ( ) ;
723
+
724
+ foreach ( var item in pageFields )
725
+ {
726
+ fields . Add ( item . Key , item ) ;
727
+ }
728
+ return fields ;
729
+ }
730
+ }
731
+
732
+ #endregion
705
733
}
706
734
}
Original file line number Diff line number Diff line change 19
19
[ assembly: CLSCompliant ( false ) ]
20
20
[ assembly: ComVisible ( false ) ]
21
21
[ assembly: AllowPartiallyTrustedCallers ]
22
- [ assembly: AssemblyVersion ( "3.2.0.1 " ) ]
22
+ [ assembly: AssemblyVersion ( "3.2.0.2 " ) ]
23
23
[ assembly: SecurityRules ( SecurityRuleSet . Level1 ) ]
You can’t perform that action at this time.
0 commit comments