Geeks With Blogs


My name is David Jacobus I am a former teacher of Computer Science and Mathematics, who is now working full time as a SharePoint Consultant! I have raced off-road motorcycles for 30+ years! I have fallen in love with Glamis and the Dune experience the last few years! My friends like to say: Jake, with age comes the cage! I suppose that is because at Glamis I use a Razor XP 900! Which has a full roll cage!

David Jacobus SharePoint Consultant

I have a client that desired to have the MOSS 2007 capability of My Links but in no way wanted My Sites in SharePoint 2010.  I took some steps that gave them the capability of My Links by creating a personalized web part that could be linked to in a modal.  It worked, However, in addition, they didn’t want users without web admin rights to see the SharePoint ribbon. The result was that admins could use the web part and the personalization data would be kept by SQL in the personalization database.  Members could not edit the web part as they didn’t have access to the Ribbon.  (Catch 22).    I took another look at the MOSS 2007 My Links and SharePoint 2010 My Links and I saw that the Personalization was to tied to the User Profile Service and was not tied to SharePoint My Sites!  Ah Ha!, we could deliver this and SharePoint would do all the work!  Here are the steps to make this happen:

1.  Go to the web part gallery:


2.  Click the Documents Tab, and then New Document:


3.  A Modal will open up, scroll to Microsoft.SharePoint.Portal.Web Controls.QuickLinksMicroView


4.  Scroll back up to the top of the page and click on the Populate Gallery button:


5.  Create a page in the pages library at the site collection level and use the Blank Web Parts page layout.  Add the QuickLinksMicroView web part to the header web part zone:


6:  Edit the web part properties and change display to Title Only, and The name to My Links;


7:  Save the page and Publish.


I wanted this page to appear in a modal from the master page so I create a link in the global links portion of the master page.  I used an ASP.NET Hyperlink Control as I needed to set the value of the link in the master page code behind.  I didn’t at first and used a simple anchor tag with href .  However, I couldn’t think of any way that would allow the correct link to be passed to a JavaScript from sub pages and possibly the layouts folder, it worked just fine at the site collection level but not in sub sites.  Therefore, the reason for the code behind.


The code behind on the master page:


protected void Page_Load(object sender, EventArgs e)

    if (!IsPostBack)

        SPSite site = SPContext.Current.Site;

        HyperLink hl = this.FindControl("HyperLink4") as HyperLink;
        hl.NavigateUrl = String.Format("javascript:OpenDialog('{0}/pages/links.aspx')", site.Url);



where open Dialog is a JavaScript function load in the master page Script tag:


function OpenDialog(myurl) {
    var options = SP.UI.$create_DialogOptions();
    options.url = myurl;
    // options.width = 500;       
    // options.height = 400;      
    //options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);        


The demo I  am making here does not have this master page so I will just open the MyLinks page with different users to show how it works. 


8:  Click on the My Links (link) this will open up the the My Site Host which is linked to the Users Profile:





9:  Now Log in as a different user:


The Rest is the same as above.  Personalization is taking place.

A great way to get users to their profile page and add custom links which will follow them around while in the site collection.  The master page I am demo’ing here has the I Like it and Tagging control in the upper right so it will also get users to see their Tags and Notes from their profile page.  For example:  I tag the Generic Landing Page:






The client Didn’t want my sites so I created another master page for the My Site Host and hid the Links for MY Site,  and My Content and made sure that the client turned off self service site collections.  In addition I had the Site Admin add a link in Central Admin to add a Portal Link back to the site collection root on all Profile pages.

Posted on Sunday, August 14, 2011 4:13 PM SharePoint | Back to top

Comments on this post: SharePoint 2010 MY Links without My Sites

# re: SharePoint 2010 MY Links without My Sites
Requesting Gravatar...
Great post...I knew this web part was hiding somewhere...thanks for helping me find it
Left by Arun Asokan on Feb 16, 2012 11:21 PM

Your comment:
 (will show your gravatar)

Copyright © David Jacobus | Powered by: