How do I set a property on document creation in Umbraco 6?
I have
created a very small news section in an Umbraco 4 installation.
The
parentpage alias is “newslist” and the news alias is “news”.
To help
making it easy and user friendly I have made an EventHandler that is called
each time a document is saved if the document alias is “news”. In this function,
I set a newsdate property. Then I runs through all the siblings, order them by
the newsdate and sets the sortOrder accordingly to the sorted list.
Now I am
trying to do the same thing in an Umbraco 6 installation.
I have made
a function that sends an e-mail to me when I am creating a document of the type “news”,
but how do I set a property? (newsDate)
How do I set a property on document creation in Umbraco 6?
I have created a very small news section in an Umbraco 4 installation.
The parentpage alias is “newslist” and the news alias is “news”.
To help making it easy and user friendly I have made an EventHandler that is called each time a document is saved if the document alias is “news”. In this function, I set a newsdate property. Then I runs through all the siblings, order them by the newsdate and sets the sortOrder accordingly to the sorted list.
Now I am trying to do the same thing in an Umbraco 6 installation.
I have made a function that sends an e-mail to me when I am creating a document of the type “news”, but how do I set a property? (newsDate)
is working on a reply...