Apr 20 2018 08:43 AM
I was able to successfully add a custom xsl to the webpart and render it the way I wanted. (I borrowed the example from here: http://mundrisoft.com/tech-bytes/how-to-customize-list-view-web-part-using-custom-xslt-in-sharepoint...)
While it is easier me to input the link to a web part by specifying the URL to the XSL Link field in the web part properties panel, it doesn't seem to be straight forward for a list page.
My goal is to to apply the same XSL file to the list view even when user clicks the title of the web part and goes to the actual list view (Allitems.aspx).
I opened up Allitems.aspx in SPD, and found the following tag -
<XslLink Default="TRUE">main.xsl</XslLink>
Could I / Should I simply change he main.xsl to my custom file to meet the goal? Something like -
<XslLink Default="TRUE">/mySharePoint/customeXSLT/myXSLT.xsl</XslLink>
Just would like to get some confirmation before I actually test it and break things
Apr 20 2018 11:37 AM
SolutionI personally wouldn't touch SharePoint Designer for this when it can mostly be achieved through the SharePoint GUI.
If you navigate to your list view page, you will be able to edit the page and it will behave exactly like a normal web part page. You'll see the List View Web Part on the page which you can bring up the web part properties for. Then in the Miscellaneous group, you'll see XSL Link where you can apply your already existing XSL file.
At least doing it this way, if you need to reverse the change you can edit the web part again and remove the XSL reference, whereas doing it through SharePoint Designer can often lead to "funnies".
Apr 20 2018 01:56 PM
Works great! I almost forgot that the list on the actual list view page is also a web part. Thanks.
Nov 13 2020 07:15 PM - edited Nov 13 2020 07:16 PM
Apr 20 2018 11:37 AM
SolutionI personally wouldn't touch SharePoint Designer for this when it can mostly be achieved through the SharePoint GUI.
If you navigate to your list view page, you will be able to edit the page and it will behave exactly like a normal web part page. You'll see the List View Web Part on the page which you can bring up the web part properties for. Then in the Miscellaneous group, you'll see XSL Link where you can apply your already existing XSL file.
At least doing it this way, if you need to reverse the change you can edit the web part again and remove the XSL reference, whereas doing it through SharePoint Designer can often lead to "funnies".