A blog about SharePoint, Project Server and other Microsoft technologies.

Friday, July 19, 2013

SharePoint 2013 - Display description of the site

When you are creating new site collection or new site in SharePoint 2013, you need to write name of the site, its URL, and administrator. Also, you have possibility to enter some short description of the site. But, after the site is created, this description isn't visible no where on the site.You can make it visible by adding new web part on the page which contains simple javascript code that will show your description.

First, I will create new site with some description:

Now, open your site on which you need to add description and click on Settings --> Edit Page:

In SP Ribbon click on tab "Insert" and then click on button "Web Part". Add new web part called "Script Editor" from "Media and Content" category:

I would love to put this in the master page, which I can edit, but I am finding that simply pasting in your snippet of code into the desired spot is insufficient. I would like it to appear right under the title, but if I insert that code under the line nothing shows up on the page.

Have you tried to debug the code in your browser (F12), do you get any error? It is possible that script sp.js isn't loaded on the page when the script is executed. Try replacing the line:SP.SOD.executeFunc('sp.js', 'SP.ClientContext', GetSiteInfo);instead of:_spBodyOnLoadFunctionNames.push("GetSiteInfo");