Connecting web parts: The easy wayOctober 9, 2008 17:38
Since Moss2007 you can implement your own connection interface which enables you to connect customized web parts. It looks like you can basically transfer any serializable information. The first thing you have to do is to define a very simple interface. The second step is to inherit the interface at the web part class that sends the information. In this class you’ll have to assign the interface as the connection interface. The last step in the provider web part is to include the “get function” described by the interface to pass the value. In our consumer web part we have to retrieve the connection interface. Once this connection has been setup we can read and use the given value. In the example code we will use the interface with the name “IMossStringConnection” to pass a string value. Tags: code example, connect, consumer, interface, provider, string value, web part.Don’t use dashes (-) in a custom site definition folder nameOctober 7, 2008 15:15For a project we designed a new site definition which used the following directory: As you might know it is possible at the “Page Layout and Site Template Settings” page (/_Layouts/AreaTemplateSettings.aspx) to limit the selectable site templates for the user. Somehow SharePoint did not allow us to set our own template as only selectable template. After we saved the page, it would simply switch back to the previous known settings.
After a lot of research, I finally managed to solve the problem by removing the – sign from the directory name. It looks like SharePoint does some kind of internal split function at the “Page Layout and Site Template Settings” page, which makes it impossible to save settings for site templates with a dash in the folder name. To prevent any trouble with your custom site definitions, make sure you don’t use a – sign in the folder name or even better: only use alphabetic characters. Tags: character, custom, dash, definition, directory, folder, layout, template. |
||