Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
If a property is not set it will not be saved in the database. But I guess you could load the actual pagetype definitions to check if your property exists.
Check out the PageType class.
There is a function in the property class:
CurrentPage.Property.ExistsLocally("MyProp")
http://sdk.episerver.com/library/cms5/html/M_EPiServer_Core_PropertyDataCollection_ExistsLocally.htm
I need a way to tell whether a page does not have a particular property defined versus having the property defined but no value set. How can I do this?
pseudo code for what I want to accomplish:
if(CurrentPage contains a property called "theProperty")
if(CurrentPage["theProperty"] != null)
do something...
I only want to apply the logic in the second "if" statement if the page has a property called "theProperty" defined.
Thanks!