Customise List View page

See previous post for basic steps regarding setting up a DataView.

Open SharePoint Designer (SPD) and edit the dispForm.aspx page of your list. Set up a DataView object on this page that joins your lists, as seen in the previous post.dataviews2_1.jpg

You can modify the layout and text of the Dataview through the ‘Design’ view in SPD, however for more advanced customisations open the ‘Code’ view and start hacking the XSL! Inside the DataFormWebPart (DataView that SPD creates) there is an <XSL > tag where you can modify the html around the data elements, or change the data elements/parameters etc yourself. Read the rest of this entry »

Replace GUID with List Name in a SharePoint DataView

Recently I was experimenting with DataViews using SharePoint Designer (SPD). Basically the SPD  interface allows you to joins two lists so you can produce a view with merged data, kind of like what you would do with a SQL JOIN query.

Well it works fine for basic queries on a live site, but there are drawbacks for planned development, such as it uses GUIDs of lists rather than a name of the list. As lists have different GUIDs across environments (even if you create a feature/code etc to deploy lists) the DataView will not deploy properly across environments as the GUID will be different.

This can be easily overcome if you open the code view of the SPD page to the Query section. The list ID will be the default GUID of the lists, just change the ListName property of the SPDataView to the Name of the list! Read the rest of this entry »