0

I have created a feature, a publishing site, in Visual Studio to MOSS - this feature contains a masterpage, some pages, some site columns (grouped to match each page) etc. I have also created a site collection, some sites and pages based on my template.

My next step is to create some definitions to contain very specific page content - therefore I have created a custom list template (a small extension to the custom list template) and from this template I have created a list and added some items to this list. On one of my pages I have a WebPart and to this WebPart I can add my list - so far so good. But how can I chance the design of how my items are shown when visitors a viewing the page? Right now they see a borring list but I wish to completely redesing this view?

1 Answer 1

1

Try the DataFormWebPart, it uses Xsl to render the resultset of an spdatasource.

Create the webpart using SharePoint Designer (just open the datasources tool in spdsigner, and drag the desired list's fields on a aspx file, which you can delete once the webpart is done), change the SPDataSource's select query to use the ListName instead of the ListId in the html source (so it stays portable / exportable) and then export the webpart.

You can even store the xsl in a separate file, maing it reusable for other webparts, allowing you to use a uniform rendering of similar webparts without recreating the styling etc. again everytime.

3
  • I have not yet worked with SharePoint Designer, only Visual Studio, but when I have created the xsl, what is then the best way to integrate it in my Visual Studio Project så I can deliver it in my wsp-package?
    – keysersoze
    Dec 13, 2009 at 18:50
  • I usually package my xsl files to be deployed to the root site's Style Library. So create a feature, use an elements.xml (default name used by wspbuilder) to include the xsl files in the package and set the deployment target of the xsl file, then deploy and activate the feature in your site collection (i.e. make the feature Site scoped)
    – Colin
    Dec 13, 2009 at 20:01
  • Sorry for my late response - I have now created my custom list design. One more thing, is it somehow easely possible to create an interface like the one to the Summary Link Web Part where it is possible to Add and Reorder when in edit mode?
    – keysersoze
    Jan 4, 2010 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.