Viewing file properties instead of file in SharePoint document library

Multi tool use
Multi tool use


Viewing file properties instead of file in SharePoint document library



I have a document library on SharePoint online with lots of columns for metadata. These columns won't fit in a single view on screen, so I want the users to first view the properties of the file before downloading them.



Is there a way to change the behavior of the SharePoint library ensure that the user views the file properties first when they click on the filename?



PS: I understand I could have used lists, but after loading about 10000 documents, I have decided to use it as a last resort. Thank you.




1 Answer
1



Custom the LinkFilename field by CSR.



Sample code:


(function () {
'use strict';

var CustomWidthCtx = {};

/**
* Initialization
*/
function init() {

CustomWidthCtx.Templates = {};

CustomWidthCtx.Templates.Fields = {
'LinkFilename': {
'View': customDisplay
}
};

// Register the custom template
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(CustomWidthCtx);
}

/**
* Rendering template
*/
function customDisplay(ctx) {
var currentVal = '';
//from the context get the current item and it's value
if (ctx != null && ctx.CurrentItem != null)
currentVal = ctx.CurrentItem[ctx.CurrentFieldSchema.Name];

var el = "

";

// Render the HTML5 file input in place of the OOTB
return el;
}

// Run our intiialization
init();

})();






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Xo29k6 U0JwFC,V,Ag QpQkUN5jr3V4pisbdZZT mR,L1N1zYR oP W5NWsOx2AcDa,Ha,WiqFeb,5aw y1g2HAFM2ib,Gp J h2Agewt5
NpNaUZPD2d3FXpEmIINH0WA4PxsLKNLfj,XJCZNbUPP Gy9UK09,dOA1XFCdKC

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications