Monday, June 11, 2012

Adding XsltListViewWebPart to sitedefinitions

If you want to add XsltListViewWebPart with custom xslt to site definition:
  1. Create a web part and do all configuration in existing site. Then export the web part this web part need some modifications to add to site definition.
  2. Exported Web Part contains ListGuid Which is difference from site to other. Remove ListGuid. Add one from these properties  ListName, ListUrl, or ListDisplayName
    One of the List* properties (ListName, ListUrl, or ListDisplayName) must be present and must specify a reference to a valid list. If more than one property is present, the order of evaluation is ListName, then ListUrl, and then ListDisplayName.
 

No comments: