London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
public override void InitializeData(ApplicationConfiguration config, PropertyDataCollection properties)
{
if (!properties["PageLink"].IsNull)
_prPage = (PageReference)properties["PageLink"].Value;
else
_prPage = (PageReference)properties["PageParentLink"].Value;
base.InitializeData (config, properties);
}
But what I have found is when the page is first created (not saved) "PageLink" does not have a value, but obviously "PageParentLink" does. However, after having a look at the collection of properties in the properties parameter, the new pages folder id is populated "PageFolderID". You could take that ID and do what you need to with the folder.
Hope this helps,
Jeremy