Site Definitions: Adding an XML Web Part to a configuration

Shane Young had a great post a few days ago on adding a preconfigured XML Web Part into a Site Definition. The pain is that all the examples in ONET.XML use the Image Viewer WP, so how do you figure out how to write the CAML for your own? And while Todd has posted about exporting his tricked out Content Editor Web Parts (CEWP) into reusable DWPs, I haven't seen exactly this trick from him (though I could have missed it).

Along the way I wanted to set the FrameType of a Members WP to Title Bar Only, since all the examples either use None or Standard. The quick way to learn the accepted values is to open the Web Part configuration zone (e.g. Modify Shared Web Part), expand Appearance, do a View Source (Alt-V, C), and in this case search for Title Bar Only. In this case you'll find that the FrameType tag can be set to Default, None, Standard, and TitleBarOnly. If only all CAML values were this intuitive.

 

No Comments