This project is read-only.

How can i add the Weather Webpart in a site definition

Oct 14, 2007 at 8:55 PM
Hi all,
For start, thanks for all your components.
I search for this time to add the weather Webpart in the default.asp from ONET.XML when i use a site template.
I test this code in my ONET.XML :
<File Url="default.aspx" NavBarHome="True">
<View List="$Resources:Gaznat,DocumentsConsoFolder;" BaseViewID="0" WebPartZoneID="Left" WebPartOrder="1"/>
<View List="$Resources:core,listsFolder;/$Resources:core,announceFolder;" BaseViewID="0" WebPartZoneID="Left" WebPartOrder="2"/>
<View List="$Resources:core,listsFolder;/$Resources:core,calendarFolder;" BaseViewID="1" RecurrenceRowset="TRUE" WebPartZoneID="Left" WebPartOrder="3" />
<AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1"><![CDATA[
<WebPart xmlns="">
<Assembly>TamTam.SharePoint.WebParts, Version=, Culture=neutral, PublicKeyToken=ca549c8a37d5a903</Assembly>
<Title>Coucou coucou</Title>
But that don't work and i have this error after creation :
Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Thank you for your help.
Romelard Fabrice MVP
Oct 15, 2007 at 7:20 PM
I find, i just paste the content of .webpart file in CDATA part :
<webPart xmlns="">
<type name="TamTam.SharePoint.WebParts.MSNWeather" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
<property name="ChromeState" type="chromestate">Normal</property>
<property name="AllowClose" type="bool">True</property>
<property name="Width" type="string" />
<property name="AllowMinimize" type="bool">True</property>
<property name="AllowConnect" type="bool">False</property>
<property name="ChromeType" type="chrometype">Default</property>
<property name="TitleIconImageUrl" type="string" />
<property name="Description" type="string">Simple Ajax Style weather webpart that uses the MSN weather site.</property>
<property name="Hidden" type="bool">False</property>
<property name="TitleUrl" type="string" />
<property name="AllowEdit" type="bool">True</property>
<property name="Height" type="string" />
<property name="MissingAssembly" type="string">Cannot import this Web Part.</property>
<property name="HelpUrl" type="string"></property>
<property name="Title" type="string">Weather</property>
<property name="CatalogIconImageUrl" type="string" />
<property name="Direction" type="direction">NotSet</property>
<property name="AllowZoneChange" type="bool">True</property>
<property name="AllowHide" type="bool">True</property>
<property name="HelpMode" type="helpmode">Modeless</property>
<property name="ExportMode" type="exportmode">All</property>

All is ok now

Romelard Fabrice