Home > Uncategorized > Provision smartpart (or other custom webparts) with a site definition (onet.xml)

Provision smartpart (or other custom webparts) with a site definition (onet.xml)

Smartpart uses some custom properties to point to the usercontrol. I found a really simple trick to find the code you need to embed to you onet.xml.
 
Just open your sharepoint site, add smartpart to a webzone, make your smartpart settings. Go to Edit -> Export. Save the file as a XML file. Copy everything excluding the first line and past it into your onet.xml in the CDATA part of your AllUsersWebPart. Et voila your custom webpart is ready for deployment, just dont forget to install and activate the custom webpart.
Categories: Uncategorized Tags: ,
  1. Tiago Deliberali Santos
    November 6th, 2010 at 21:32 | #1

    Thanks!

    straight to the point!

  1. No trackbacks yet.