Pre-Expand the “Show More” link in a SharePoint Task List

I found this brilliant (and short) blog post about how to pre-expand the annoying “Show More” link in a SharePoint task list.

Namely this sort of thing, seen below:

Here’s the blog post (link), and just for good measure, I’ve captured the heart of it below, just in case the link goes offline.

… Just add a Content Editor web part on the page and fill it with the following script:

<script type="text/javascript">
    (function () {

Many thanks to Inge Rush for her post!

6 responses to “Pre-Expand the “Show More” link in a SharePoint Task List

  1. Here’s a similar issue I’ve been struggling with. Now that I figured it out I thought I should share.

    Here’s how to automatically expand the “Show More” links under each search page refiner.
    Issue: On our search pages, the refiners return 5 items and a . Clicking expands the list to show all. We would like to increase the initial number of items returned.
    Fix: Editing lines in the filter file to change the numbers assigned to the variable “shortListSize”
    Details: When editing these files, “//” on a line comments out anything following.
    The file edited is the filter template used for your page. In my case it is the new file: Filter_Default_expanded
    I created & edited the new file Filter_Default_expanded.html from \\\_catalogs\masterpage\Display Templates\Filters\Filter_Default.html.
    The first section of code “var shortListSize”, sets the threshold for the initial number of rows returned. By default it is set to 5. Change this number to anything you like.
    The second section of code “shortListSize” sets the threshold at which all rows are returned. By default it is set to 6. Change this number to anything you like.
    Change the on the third line of the file. This is the name that will appear in the “Display template” dropdown as shown below.
    Once the above changes are saved and assuming you saved them into a new filter, you need to select the new filter in your refiner setup.

  2. I tried this but it does not show up in the list of the Refiner panel. Is there something I am missing? Tried republishing JS/HTML. Thanks. We are on o365 if that matters.

  3. I’ve tried applying this by linking to a file and pasting directly into the content editor. It hasn’t worked for me.

    1. Sorry, the article is a bit older now, it may not apply any longer to SharePoint Online or SP2016.

Comments are closed.