Problem setting property value on new document creation
Hi all
Trying to implement a handler for a particular docuement type that auto sets umbracoNaviHide to true on New document creation.Can anyone see any glaring errors?
Other aspects of this project in VS work fine its just that this bit of code does not seem to do what it ought...
Umbraco version 4.7 by the way.
Cheers
JG
using umbraco.BusinessLogic; using umbraco.cms.businesslogic; using umbraco.cms.businesslogic.web;
namespace umbracoHomeMInders.App_Code { public class DocumentProperties : ApplicationBase { public void SetPropertyNewEventHandler() { Document.New += new Document.NewEventHandler(Document_New); }
Problem setting property value on new document creation
Hi all
Trying to implement a handler for a particular docuement type that auto sets umbracoNaviHide to true on New document creation.Can anyone see any glaring errors?
Other aspects of this project in VS work fine its just that this bit of code does not seem to do what it ought...
Umbraco version 4.7 by the way.
Cheers
JG
Hi Julian,
Have you tried hooking into a later event? Say Document.BeforeSave, or Document.AfterSave?
Cheers, Lee.
Hi Lee
I can give it a go :-)
But the above code should work shouldnt it?
Thanks
Jules
is working on a reply...