Posts

Showing posts with the label webpart

Get Web Part Title and Add Link / Text / Image to the right side of the web part title

Here is the code to get web part title and then add image or text or link in web part title and right align that. You have to put this code in Script editor web part or put this code in a file & store somewhere & provide link to master page or provide link to content editor web part // Function to add link/text/icon in right side of the web part title  $(document).ready(function () {     var className='.ms-webpart-titleText';     $(".ms-webpart-chrome-title span h2").each(function(inx){                var webPartTitle = $(this).text();                         //Check web part title         if(webPartTitle.indexOf("My Web Part Title")>=0)         {             var openUrl ="javascript:OpenPopUpPageWithTitle(\""+_spPageContextInfo.siteServerRelativeUrl+"/Style Library/MyFolder/MyPage.aspx?IsDlg=1\", RefreshPage, null, null, \"My Page Title\"); return false;";                         $(this).prepend("&

Welcome Webpart OR Hello Webpart OR Greeting Webpart

Image
Download Setup Download Installation Instructions Download Guide Here is the Welcome web part you can call it Hello web part OR Greeting web part as well. In this web part you can see the current user’s name with his/her photograph, you can set user’s first name, last name, full name and current site name. This web part works with SharePoint Server 2010. I am using user profile services to show the current user full name, first name, last name and user picture. You can set color, height, width, background color/image etc. Here is the description of each property: Templates: If you want to show full name of current user, you should use [UserName]. If you want to show first name of current user, you should use [FirstName]. If you want to show last name of current user, you should use [LastName]. If you want to show name of current site, you should use [SiteName]. Show User Picture: If you do not want to show user picture.