Developers
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
New Creator

Extend Event Handler When Folder is Created

Jump to solution

I'm looking for a way to extend the event handler that gets called when a folder is created (inside the content tree) so I can run validation.  I also need a way to display a message to the user depending on the validation outcome.  Is there a way to do this?  

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Head of Support
Head of Support

Re: Extend Event Handler When Folder is Created

Jump to solution

You cannot run code on a folder specifically.  However you can create folder using a model that has a default page i.e. index or default and put code in new.aspx for the template for that page and that code can run upon creation.  For validation you can either place content in the asset or even email the user using Util.Email.

View solution in original post

2 Replies
Highlighted
Head of Support
Head of Support

Re: Extend Event Handler When Folder is Created

Jump to solution

You cannot run code on a folder specifically.  However you can create folder using a model that has a default page i.e. index or default and put code in new.aspx for the template for that page and that code can run upon creation.  For validation you can either place content in the asset or even email the user using Util.Email.

View solution in original post

Highlighted
New Creator

Re: Extend Event Handler When Folder is Created

Jump to solution

Thanks for the reply Kensnyder.  Your work-around is not not ideal for my use case but it's good to know.

0 Kudos