Saving custom designer settings for reuse
This one might be a little overly complex, but just wanted to throw it out there in the event anyone has tackled this.
I've built a custom control with a custom designer, settings are picking up perfectly. The control is going to be reused at multiple points on the site, but often with one of the same set of 10 "stock" settings. Is there any way to set the designer up to save these settings as they are created and then allow the user to select from a list either one of the ten, or click a custom button to expose the rest of the designer?
The only two ways I can think of doing this are:
1) Create 10 different custom controls to be reused with the settings baked in. They can derive from the existing control so that I still have some re-usability with the design, but the default controls will be locked down. Upside here would be I could change the look/feel in one place and have it update everywhere it's used on the site.
2) Hard code the default settings into the control designer. This would work fine for the settings I have defined now, but if I want to save something new down the line, I have to code it into the control. Not impossible, but not ideal.
I guess I'm looking for a "share settings" option for custom controls along the lines of sharing content for use in content blocks. Is this even possible? Any suggestions would be appreciated.
Steve,
This is an excellent suggestion Tim, and actually Sitefinity has a pretty solid configuration framework built right in.
Take a look at this recent blog post: Creating Custom Configuration Settings in Sitefinity 4
you can use this to easily store the conguration, including default values.
hope this is helpful!