2

Are there any way to edit the default limit of ten terms in the termstore view?

enter image description here

  • Yes, with PowerShell :-) – Benny Skogberg Mar 18 '15 at 20:36
  • Hi, just curious, have you seen my answer? :) – Vadim Gremyachev Mar 19 '15 at 11:57
  • 1
    @VadimGremyachev I have, I will start working with that solution during friday, I'll keep you posted. Thanks! – Eric Herlitz Mar 19 '15 at 12:49
1

Microsoft.SharePoint.Taxonomy.Tree JavaScript control (treecontrol.js) is intended for rendering Taxonomy tree control. Microsoft.SharePoint.Taxonomy.Tree PageLimit property defines the number of visible terms.

You could consider the following solution to override default (10) PageLimit property value:

ExecuteOrDelayUntilScriptLoaded(function(){
    Microsoft.SharePoint.Taxonomy.Tree.prototype.set_pageLimit(15);
}, 
'treecontrol.js'); 

The example demonstrates how to make 15 terms visible when TermSet is expanded.

In order to apply the changes per web/site:

  • Save the specified code into treecontrol.settings.js file and upload it into for example into Style Library
  • Reference the specified file in master page

The solution is compatible with SharePoint 2010/2013 and Online versions

Result

enter image description here

  • This looks like it is in Site settings > Term store management. Does this also work in the controls that users see? Can it be expanded to realistic limits like 50? – Rothrock Mar 31 '15 at 22:54
0

I had to do something similar to what Vadim suggested in order to fix the modal dialog box when users are editing metadata fields.

NOTE: for Sharepoint 2013

put a file in styles library like: custom.sharepoint.behaviours.js

contents:

/* belongs in styles library */
function CustomSPBehaviours() {
//  console.debug(["custom.sharepoint.behaviours", Microsoft.SharePoint.Taxonomy]);
  if(typeof(Microsoft.SharePoint.Taxonomy.Tree)=='undefined')
    return;
  Microsoft.SharePoint.Taxonomy.Tree.prototype.set_pageLimit(30);
};
SP.SOD.executeFunc('treecontrol.js', 'SP.ClientContext', CustomSPBehaviours);

add this line before the ending body tag of master.template

<script type="text/javascript"; src="/sites/mysharepointsite/Style%20Library/custom.sharepoint.behaviours.js"></script>

add the same line to the file (prior to the last ending asp:content tag)

c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\WebTaggingDialog.aspx

the WebTaggingdialog change is needed because the Term Set Picker is a modal dialog box that initalizes treecontrol

In my situation I had a bunch of hidden terms and the paginations were returning only a few selectable items as the hidden terms were taking up the remaining spots...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.