Server DWP Modification

WPResources Directory

Modifying Server DWP Files

When you modify a DWP file that resides on the server, any new web parts created from that DWP file will inherit the modified properties. Any web parts that already exist in the WSS Sites will not be updated with the modified properties. For example, if you have already dragged a web part from a web part gallery onto a site, that instance of the web part will not reflect any changes you make to its underlying DWP file. However, any new web parts that you create by dragging the web parts from a web part gallery onto a site will reflect the modified properties.

All CorasWorks DWP files are located on the server in the following directory:

C:\Inetpub\wwwroot\wpcatalog\

Before making modifications to an existing DWP file, it is recommended that you first make a backup copy of the DWP file in case the file needs to be restored in the future. Also, you may wish to give the DWP files that you modify a new, unique name, as this will keep your modified DWP files from being overwritten if you should reinstall any of the CorasWorks web parts.

Edit DWP

Editing a DWP file is easy. Simply open the file in Windows Notepad, modify the settings, and then save your changes. Since the DWP file is an XML file, you can optionally edit it with any XML-compatible editor. Whenever you edit a DWP file, ensure you are using the correct XML namespace for the web part. The XML namespaces for the CorasWorks web parts are listed in this help file in the CorasWorks XML Namespaces topic. That topic includes a listing of all the available DWP properties that you can modify for each CorasWorks web part.

Sample DWP File

Below are the contents of a sample DWP file for a Contacts Roll-Up Advanced web part. To modify the default behavior of this web part, simply modify the value of the XML node for the property you want to change. If the property is not listed, you add it to the XML.

<?xml version="1.0" encoding="utf-8"?>

<WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2">

  <Title>Contact Roll-Up Advanced</Title>

  <FrameType>Default</FrameType>

  <Description>This Web Part will rollup all Contact Lists into a Tree-View form. From here users can manage, filter, and search Contact list items.</Description>

  <IsIncluded>true</IsIncluded>

  <ZoneID>Left</ZoneID>

  <PartOrder>3</PartOrder>

  <FrameState>Normal</FrameState>

  <Height />

  <Width />

  <AllowRemove>false</AllowRemove>

  <AllowZoneChange>true</AllowZoneChange>

  <AllowMinimize>true</AllowMinimize>

  <IsVisible>true</IsVisible>

  <DetailLink />

  <HelpLink>http://central.workplace.corasworks.net/support/WebPartHelp/CWSCARST.aspx</HelpLink>

  <Dir>Default</Dir>

  <PartImageSmall />

  <MissingAssembly>This Web Part has failed to load due to a missing software file.  Please contact CorasWorks (http://www.corasworks.net) and provide them with the name of the Web Part [Contact Roll-Up Adv] and the URL in your browser.</MissingAssembly>

  <PartImageLarge>_WPR_/contact.gif</PartImageLarge>

  <IsIncludedFilter />

  <Assembly>CorasWSC.Contact.RollUp.Adv, Version=51.0.26.1, Culture=neutral, PublicKeyToken=a66eaee6d3fbdabb</Assembly>

  <TypeName>CorasWSC.Contact.RollUp.Adv</TypeName>

  <ShowAdmin xmlns="CorasWSC.Contact.RollUp">false</ShowAdmin>

</WebPart>

 

Below, we have added a new property to the DWP file called ReturnType and have set the value to los. Now any new web part that is instantiated from this DWP file will have the Return Type as Line of Site instead of the original default of Selective. Note the namespace (the xmlns tag) used must match the correct namespace for the web part being modified. In this case, it is CorasWSC.Contact.RollUp. For a list of CorasWorks namespaces, see CorasWorks XML Namespaces.

<?xml version="1.0" encoding="utf-8"?>

<WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2">

  <Title>Contact Roll-Up Advanced</Title>

  <FrameType>Default</FrameType>

  <Description>This Web Part will rollup all Contact Lists into a Tree-View form. From here users can manage, filter, and search Contact list items.</Description>

  <IsIncluded>true</IsIncluded>

  <ZoneID>Left</ZoneID>

  <PartOrder>3</PartOrder>

  <FrameState>Normal</FrameState>

  <Height />

  <Width />

  <AllowRemove>false</AllowRemove>

  <AllowZoneChange>true</AllowZoneChange>

  <AllowMinimize>true</AllowMinimize>

  <IsVisible>true</IsVisible>

  <DetailLink />

  <HelpLink>http://central.workplace.corasworks.net/support/WebPartHelp/CWSCARST.aspx</HelpLink>

  <Dir>Default</Dir>

  <PartImageSmall />

  <MissingAssembly>This Web Part has failed to load due to a missing software file.  Please contact CorasWorks (http://www.corasworks.net) and provide them with the name of the Web Part [Contact Roll-Up Adv] and the URL in your browser.</MissingAssembly>

  <PartImageLarge>_WPR_/contact.gif</PartImageLarge>

  <IsIncludedFilter />

  <Assembly>CorasWSC.Contact.RollUp.Adv, Version=51.0.26.1, Culture=neutral, PublicKeyToken=a66eaee6d3fbdabb</Assembly>

  <TypeName>CorasWSC.Contact.RollUp.Adv</TypeName>

  <ReturnType xmlns="CorasWSC.Contact.RollUp">los</ReturnType>

</WebPart>

When you have completed modifying the DWP file, save it back to the C:\Inetpub\wwwroot\wpcatalog directory.

NOTE: It may be necessary to reset ISS before the newly modified web part becomes available in the web part gallery.

 

Back to Top