Sitefinity 4 attach user control to page on creation
I'm using Sitefinity 4.2. I have cre开发者_如何学编程ated a masterpage, with content placeholders, which I am using as a template when creating a new page. I then have several different custom user controls, which I drop into the different placeholders, and set the parameters for them through the control edit forms. This standard scenario works fine.
As our end users are not very sophisticated, I would like to create a new scenario in which, when a new page is created via the admin console on the basis of my masterpage, different controls are programmatically inserted into the various placeholders, and values for control properties are set. All the end user then has to do is to tweak the property values on one or two controls, and he's done.
Any ideas on how I would go about doing this?
For what you're describing, I'd suggest utilizing page templates. You can specify a master page to use and also drop widgets in to the placeholders you've established. Users can then create new pages based off of this template and your settings will carry over.
Widgets that you configure in a template can't be modified outside of it so you'll want to leave any that the user should be able to change, from the page editor, out.
You can create a page template by going to Design->Page Templates in the admin section.
精彩评论