How To Remove/Change “There Are No Items”

When using the “Shaded” style on a view in SharePoint 2013, if there are no items in that view/list then SharePoint shows “There are no items to show in this view of the “Child” list. To add a new item, click “New”.”

3

After doing some research I found a link with some that assisted me. Its quite simple, add the code below into a Content Editor Web Part on the page and it would change it for you. You can even change the text to something you like by changing the inner.HTML tag in the code. Thanks to Uday Kumar Reddy for this blog post.

<script>
function ChangeDiscussionMessage()
{

  var a = document.getElementsByTagName("TD")
  for (var i=0;i<a.length;i++) { if (a[i].className=="ms-vb") { if (a[i].innerText.indexOf("There are no items to show in this view")>-1)
      {
         a[i].innerHTML = "No items in this list."; #AD
      }
    }
  }
}

_spBodyOnLoadFunctionNames.push("ChangeDiscussionMessage")

</script>

Hope it helps..

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s