What i wanna do is set the "umbracoNaviHide" property of a new document to "true", so the user doesn't have to do it himself (they keep forgeting). I tried to use the "Document.New" event that but since it's my first time with events I'm probably doing something wrong because it's not firing up. Maybe something when translating the code from c# (demos/documentation) to vb.net.
I hope somebody can help me with that one, here is the class:
Another option I've used on a couple of projects could be a custom true/false data type that defaults to true, I'll see if I can find the link and post for reference. Matt
//var doc = new Document(sender.Id); //doc.getProperty("blogitemDate").Value = DateTime.Today.ToString("YYYY-mm-dd");
thanks for posting you question codemaster, this way I found out to set the property of sender instead of making a new document and setting that property.
Change property on a new document
Hi;
What i wanna do is set the "umbracoNaviHide" property of a new document to "true", so the user doesn't have to do it himself (they keep forgeting).
I tried to use the "Document.New" event that but since it's my first time with events I'm probably doing something wrong because it's not firing up.
Maybe something when translating the code from c# (demos/documentation) to vb.net.
I hope somebody can help me with that one, here is the class:
Basically, what I'm doing is compiling it and copying the dll to the bin folder.
After two hours i realized i inherited from "Application" instead of "ApplicationBase".
Another option I've used on a couple of projects could be a custom true/false data type that defaults to true, I'll see if I can find the link and post for reference. Matt
Heres the link to a forum post on how to setup the custom data type (at the bottom)
http://forum.umbraco.org/yaf_postst7863_Default-property.aspx
Another option might be the to use the Default DataTypes project
http://our.umbraco.org/wiki/reference/default-datatypes
Matt
You right. A custom data type (based on an user control) would be a lot of easy to implement and reuse. Thanks a lot.
thanks for posting you question codemaster,
this way I found out to set the property of sender instead of making a new document and setting that property.
off the record,
it's ToString("yyyy-MM-dd") instead of ToString("YYYY-mm-dd")
is working on a reply...