Re: Adding default webparts to areas and web part pages in SPS

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Brad Smith (asmodean_at_cox.net)
Date: 03/05/04


Date: Thu, 4 Mar 2004 20:21:59 -0500

You will only be able to add the webpart you are describing to the area and
site templates (default.aspx). The allitems.apsx pages and other admin
pages do not have webpart zones, and so cannot contain webparts. Further,
you cannot edit the pages that are in the _layouts virtual with Frontpage.
The only way you would be able to produce the effect would be to alter the
site definition templates that they are created from.
As for the custom web part pages, I haven't seen a corresponding config file
to list the default webparts for one though you can modify the site
definition template that it is created from the same as the _layouts
templates.

-Brad

"Anders" <raskpetersen@hotmail.com> wrote in message
news:547475ee.0403040756.26a04db8@posting.google.com...
> Could it be true that noone have messed around with modules in
> ONET.XML or tried to add default web parts in the templates? :-O
>
> Maybe ill get an answer if i try to rephrase my question ;-)
>
> What i need to do is to add default web parts to both area templates
> (default.aspx), list templates (fx. allitems.aspx) and any other WSS
> template that are present in the area template structure.
>
> The first part of this works fine: i can get default web parts in my
> default.aspx pages (sub areas) by customizing the <modules ..> section
> of ONET.XML for the area template. But since the web part i am
> inserting is a navigation template that is inserted into a new web
> part zone i also need the web parts to show up in lists, web part
> pages etc...
>
> Since the documentation in MSDN library and the SDK is *really* poor,
> i would be really grateful if some MVP or other guru could please help
> me out :-o
>
> Thanx
> //AndersR
>
> raskpetersen@hotmail.com (Anders) wrote in message
news:<547475ee.0402170326.5f9d5d29@posting.google.com>...
> > Hi,
> >
> > 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.. :-S
> >
> > Any help is greatly appreciated since im on a nasty deadline (as usual
> > ;-)
> >
> > thanx
> > //AndersR



Relevant Pages

  • RE: Area Templates
    ... "Romulo Marques" wrote: ... > I'm trying to create a area template in SP2003 and It seans not so simple. ... > I read a lot f articles about it, almost about Site templates, themes and ... but feel about area templates. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Area Templates
    ... I'm trying to create a area template in SP2003 and It seans not so simple. ... I read a lot f articles about it, almost about Site templates, themes and ... but feel about area templates. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Area Template
    ... I'm trying to create a area template in SP2003 and It seans not so simple. ... I read a lot f articles about it, almost about Site templates, themes and ... but feel about area templates. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: HELP - SOME *.DOT FILES HANG MOMENTARILY
    ... Are you really inserting data into the templates themselves, ... do the templates that hang have any code in them? ... The *.dot files are located on a network ...
    (microsoft.public.word.vba.general)
  • Re: inserting pages in publisher layout view
    ... templates & don't deviate from their design, ... Bob Jones ... [MVP] ... When I used Publisher on my PC I was given the choice of inserting a new ...
    (microsoft.public.mac.office.word)