WSS Forum

 
Home » Forum » WSS       Ask a questionRSS Feeds

Adding default webparts to areas and web part pages in SPS

  Asked By: Jerry Ellis         Date: Dec 12, 2004      Category: WSS      Views: 1850
 

ive been working with customizing the area templates in SPS and have
come along way in understanding how things are connected.

There is however one thing that i just cant get to work: adding
default web parts to lists, web part page templates etc.

I have created a custom area template
(..60\TEMPLATE\1033\CUST_SPSTOC). In that i have added a custom
webpartzone (navbarzone) to wich i want to add a custom web part.

This works fine in all "areas" but in lists
(CUST_SPSTOC\LISTS\somelist) and web part pages (fx. the templates in
CUST_SPSTOC\DOCTEMP\SMARTPGS\) the zone is there but no web parts are
inserted!

I have edited the ONET.XML for the area template as follows:
<Module Name="Default" Url="" Path="" RootWebOnly="FALSE">
<File Url="default.aspx" Type="Ghostable">
<AllUsersWebPart WebPartZoneID="navbarzone"
WebPartOrder="0"><![CDATA[
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" >
<Title>Nav webpart - DONT REMOVE</Title>
<Description>GetDepartmentFromAD</Description>
<Assembly>GetDepartmentFromAD</Assembly>
<TypeName>GetDepartmentFromAD.GetDepartmentFromAD</TypeName>

<FrameType>None</FrameType>
<FrameState>Normal</FrameState>
<AllowRemove>false</AllowRemove>
<AllowClose>false</AllowClose>
<AllowZoneChange>false</AllowZoneChange>
<AllowMinimize>false</AllowMinimize>
<IsVisible>true</IsVisible>

</WebPart>
]]></AllUsersWebPart>
</File>
</Module>

I have searched and read the CAML reference and its still a bit
unclear to me how you define what a <MODULE ..> really is and how you
get a module to add web parts certan places. I also tried inserting
the web part in the WebPartPopulation instead, but this didnt work
either..


Do you know someone who can help? Share a link to this thread on twitter, or facebook.

Tagged:                      

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Adding default webparts to areas and web part pages in SPS Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].