Hi
It can be done programmatically in FeatureReceiver. Use SPFile and
SPLimitedWebPartManager. Something like that:
SPFile f = rootWeb.GetFile("Pages/Default.aspx");
f.CheckOut();
SPLimitedWebPartManager wpm =
f.GetLimitedWebPartManager(PersonalizationScope.Shared);
..........
wpm.AddWebPart(YourWebPart, "TopZone", 1);
f.CheckIn(message);
f.Publish(message)
Marina
__________________________________________________________
"Sharepoint Consultant" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
29/07/2008 02:37 PM
Please respond to
[email protected]
To
[email protected]
cc
Subject
[OzMOSS] Feature to add Webpart to existing Default.aspx
Does anyone know if you can add a wepart to the existing default.aspx page
via a feature elements file. If so could you please send me a example.
Or does this need to be done via a feature Receiver and code?
Thanks heaps.
-------------------------------------------------------------------
OzMOSS.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject.
Powered by mailenable.com
------------------------------------------------------------------- OzMOSS.com
- to unsubscribe from this list, send a message back to the list with
'unsubscribe' as the subject.
Powered by mailenable.com