Hi lovely SP people. I’m trying to get some help or pointers in the right direction. I have a custom html masterpage and would like to use list data to drive the masterpage content for example I have a news carousel and would like to populate the carousel using a list. I have been looking at xslt. Is there a better way? Could I use Web Dev languages such as javascript to do this. Any help,tutorials or assistance would be greatly appreciated.
You can gather information from lists using a few ways but it is important to note if you want something embedded in the master page or just a carousel on a landing page.
1. Web parts on a page – This option will not do anything with the master page but you can use out of the box SharePoint web parts to show data from lists on different pages. There are some limitations here as to which web parts can’t pull data from other sites or site collections. An example could be the picture slideshow web part where you point the web part to a collection of pictures and the web part will do the slide show. Or you could use the list web part that you want to show and modify the view using either out of the box styles or add JSLink styles to it to get the view you want.
2. Search – As long as you didn’t turn it off or not crawl it then all SharePoint content is viewable by using search results. In SP 2013+ you can use content search web parts to write queries to pull data from lists/libraries and then modify display templates to choose how you want the results to look. In SP 2010+ you can also use the search results web part to do something similar. Here are some instructions on how to create and image carousel using a content search web part
3. REST/SOAP Services – These are web services built into SharePoint that allow you interact with content. There is a lot more information out there on how to interact with these services but if you wanted to customize your master page this would be a path to take. These could be reusable solutions that work across pages and are not specific as a web part. Here is one example on how to build a slider using REST and jQuery.
http://bastiaanjacobs.nl/2014/04/09/sharepoint-2013-rest-slideshow/