I am new to sharepoint. I am developing a sharepoint portal teamsite page. I want to add a document library list view web part to a custom page. how do i go about it? should i add it in .aspx or my List's schema.xml? thanks
Assuming SharePoint 2010, 2013, 2016, or online ... could you just use the "Edit Page" button and then insert a list view webpart (all through the in-browser UI)?
If you're asking about best practice, I personally prefer to have a webpage in a page library (or just edit the site landing page) and insert a list view there. I found that modifying the ListView.aspx leads to people getting confused when the ribbon doesn't display by default anymore. Not sure if that ribbon display problem ever got sorted out in later versions of SharePoint, but it was a huge issue with a client of mine running SP2010.
You can create a web part page and add a web part by edit a page. You can follow below steps
- Edit the newly created page
- Click "Add a Web Part" in your preferred zone.
- Select "Lists and Libraries" from the Web Part Galleries section on top ribbon.
- Select the "Library" you want to add and Click "Ok" button.
SharePoint 2013 / 2016:
- From above steps instead of "Lists and Libraries" you will see "Apps".
You can further customize the web part from the Web Part properties. (Select newly added web part -> Edit Properties).
Below msdn article will give you complete details about List View Web Part https://support.office.com/en-us/article/List-View-Web-Part-ced04ead-c6b5-4c43-a3f0-70c5408ef5a6