Forum Discussion
Document Library - Add "Navigation/Info Elements"
Hi All
Is there any way to add web parts to a document library page?
I have a requirement to put "instructions" above (or on the same page as) a document library.
The only way I know to do this is to create a page and put the document library web part on it.
- This is not ideal. as it is not the full document library experience
- clicking the "see all" takes you to the document library, but this creates confusion for users in terms of navigation
Another Option would be to "pin" a "how to use" document ... but this requires us to create and pin this document and is quite "ugly"
I had hoped this would be part of the new library expereince https://supersimple365.com/sharepoint-document-libraries-are-getting-a-new-user-experience/
1 Reply
- Rob_ElliottSilver Contributor
It is not possible to add web parts to a library or list, they are for pages only. What you could do is to format one or more columns with a custom JSON hover card displaying instructions for each column. When the user hovers over the column data the hover card is displayed:
To do this you format the column in advanced mode with the following JSON, adjusting it to taste:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": {}, "txtContent": "@currentField", "customCardProps": { "formatter": { "elmType": "div", "txtContent": "Charles V bequeathed Malta to the Sovereign Military Order of St. John of Jerusalem who ruled over Malta from 1530 to 1798. Following the Great Siege of 1565, the Knights took Malta through a new golden age, making it a key player in the cultural scene of 17th and 18th century Europe. The artistic and cultural lives of the Maltese Islands were injected with the presence of artists such as Caravaggio, Mattia Preti and Favray who were commissioned by the Knights to embellish churches, palaces and auberges. In 1798, Napoleon Bonaparte took over Malta from the Knights on his way to Egypt. The French presence on the islands was short lived, as the English, who were requested by the Maltese to help them against the French, blockaded the islands in 1800. British rule in Malta lasted until 1964 when Malta became independent. ", "style": { "font-size": "14px", "color": "teal", "padding": "5px", "width": "300px", "height": "400px" } }, "openOnEvent": "hover", "directionalHint": "bottomLeft", "isBeakVisible": true, "beakStyle": { "backgroundColor": "white" } } }Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, Power Platform, WSP Global (and classic 1967 Morris Traveller driver)