How to get the value of custom fields of blog page?

Topics: Controls
Jan 2 at 2:30 AM
Edited Jan 2 at 3:05 PM
For blogengine 3.2, I can use Post.CustomFields["captionimage"] to get value of Custom Fields, but can not do the same with blog page. When I use Page.CustomFields["captionimage"], I got error.
For example, in Page.aspx, I need to get the value of a certain item in CustomFields of the current page.
how to get the value of the value custom fields of blog page?
thanks.
Coordinator
Jan 2 at 6:05 PM
The page missed a property, fixed with 3.0.0.2
Github and downloads updated (only BlogEngine.Core.Dll changed).
Can use similar to post, with: Page.CustomFields["foo"].Value
Marked as answer by robinliug on 1/3/2016 at 7:10 AM
Jan 2 at 7:20 PM
Edited Jan 2 at 7:22 PM
Hi, etur,
I got the code. thanks.
Just share a feature I added to my blogengine website community.bidwin.org:
here is the page:
http://community.bidwin.org/page/Foreclosure-Tutorial
if a visitor is not logged in, I get the value of the customfields["RequireLogin"],and if it is "yes", I display the page.description, plus a div that requires visitor to login or regsiter to my website.
You can do the same with your posts.
I also use page.customfields to determine if an Exit Intent Popup should be displayed to visitor to collect user email address.
here is an example:
http://community.bidwin.org/post/Realtors-Guide-to-Online-Real-Estate-Auctions
an Exit Intent Popup div will show automatically in 5 seconds after page is load.

with content marketing, collecting the user email address is very important.