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!

Auto-naming of pages when saving

Vote:
 
I have a client who would like to set up their news articles so that when they create and save the page is automatically saved with the name set to Date-Article Name. Is this possible to do for a single page-type (in this case NewsDetail) and if so, how the heck do I set it up or code it? As a side note, the Article Name is a property on the NewsDetail page type. Any suggestions would be greatly appreciated. Frankly, I think it's just laziness, but the client is always right... Jordan
#13174
Aug 23, 2007 18:32
Vote:
 
First of all, the client isn't always right, some idéas seem great to them until they actually get them :). However, this can be solved by hooking the page-saved event in global.asax. You can change properties there before the page is actually saved, and this can be done on a given page type by looking at the pagetypeid property.
#15494
Aug 27, 2007 12:04
Vote:
 
Excellent. I'll give that a try. The beauty here is that I can pull the code once they discover it's not working the way they want. Sometimes you need to let 'em stub their toes a couple times before they see the light. Thanks Björn
#15495
Aug 28, 2007 16:01
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.