Sunday, 13 June 2010

XSLT List View Web Part (XLV)

SharePoint 2010 has a heavy reliance on the Xslt List (XLV) View Web Part (WP). The replaces the MOSS List View Web Part (LVWP). In MOSS the Content Query Web Part (CQWP) was heavily utilised and the XLV WP is often a better option in SP 2010.

The old LVWP used CAML to provide custom views of the data/lists. Customising the XLVWP display is is done using xslt.

XLVWP has a default xslt for display located in the 14 hive at _layouts/xsl/main.xsl
main.xsl uses vwstyles.xsl and fldtypes.xsl that does most of the work on all the XLVWP in your SP farm.

Note. "XSLT is schema dependent because it iterates through the list of columns by naming each one explicitly. Using XSLT, the schema of the rendered list is fixed; it’s not possible to change the set of fields without changing the XSLT." - Eric Andeen.

XLV WP model - How it works

A custom xslt can either be placed ina style library or in th 14 hive.
Using SharePoint Designer (SPD)2010, you can customise the the XLVWP

More Info
SPD 2010 working with XLVWP
XSLT customisation
Customise the XLVWP
Connected Web Parts (XLVWP)


Post a Comment