IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
While working with the libraries in the Documents and Files/Images/Videos sections, when you try to filter some items, the system redirects you to a page where all items for the currently selected library are displayed. To set a default filter for library items, and a customized display (for example, displaying only the current user's items), you must change the default LibrariesMasterExtensions java script file with a new java script file in which the filter is applied. In the sample below, you will set a default filter for the Documents & Files libraries and will display only the items of the current user. To implement this functionality, perform the following:
var myUserId; function OnMasterViewLoadedCustom(sender, args) { myUserId = sender._currentUserId; var itemsGrid = sender.get_currentItemsList(); itemsGrid.applyFilter("Owner == (" + myUserId + ")"); }
var myUserId;
function OnMasterViewLoadedCustom(sender, args) {
myUserId = sender._currentUserId;
var itemsGrid = sender.get_currentItemsList();
itemsGrid.applyFilter("Owner == (" + myUserId + ")");
}
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important