Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to display the user profile picture next to the Welcome Menu in the top right and I have it working after following Erik Swenson's blog but it doesn't seem to be working on My Sites. This is the code I am using in the master page:

This code is at the top of the masterpage:

<%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

And this code is in the of the masterpage:

<SPSWC:ProfilePropertyImage PropertyName="PictureUrl" style="float: left; height: 20px;" ShowPlaceholder="true" id="PictureUrlImage" runat="server"/>

Like I mentioned, this code works fine and the image is displayed when on regular site, however, I added the same to my custom My Sites masterpage and nothing is displayed, any idea what it could be or what needs to be done differently for My Sites?

Thank you!!!

share|improve this question
    
The contentplaceholder that you put it in may be missing or hidden... –  Mike Aug 7 '12 at 20:18
    
thanks for the reply! but I don't think that's the problem :( I put the second line of code in the s4-trc-container-menu div of the masterpage which should put it as part of the Welcome Menu. The Welcome Menu is visible but the image is not...I've made sure to add a visibility:visble in the CSS tag for this and still nothing –  Tudor Aug 7 '12 at 20:25
    
Are you using SPD? Is it appearing in Design View? –  Mike Aug 7 '12 at 20:27
    
I'm actually using Visual Studio as I am stapling the masterpage as a feature to the My Site site collection. I just opened the masterpage in SPD and I don't see it in the Design View, nor do I see the Welcome Menu which is actually visible in IE. Any ideas? –  Tudor Aug 7 '12 at 20:32
add comment

1 Answer

up vote 0 down vote accepted

MySite has it's own navigation control, defined in 14/templates/controltemplates/MySiteTopNavigation.ascx. This is registered in the GlobalNavigation delegate control

This control has a MyGlobalNavigationFixup control that actually hides the RibbonTabRowRight and SiteActionsMenuMain controls to remove the default welcome control and search boxes from your master page, and it adds it's own s4-trc-container-menu (open the file on disk, and you will see).

This is why you don't see the changes on MySite. To make the changes appear on MySite as well, you need to make sure your code works for both the default control and for the one that MySiteTopNavigation adds.

share|improve this answer
    
Thanks! So what I did, is I created a copy of the MySiteTopNavigation.ascx file and added the code above in there, now the image shows up! Not sure if this is what you meant I should do but I tried placing my code in many spots within the masterpage and it didn't seem to work... –  Tudor Aug 8 '12 at 16:06
    
That's close, though I think the preferred approach is to create a delegate control (copying the control as you did) and then install it so it overrides the existing control. Look at how delegate controls and overrides work. –  Matthew McDermott Aug 9 '12 at 16:38
    
Yes, you need to create a new delegate (copy mysitetopnavigation.ascx and change to behave correctly), like Matthew says, and then register it for the GlobalNavigationDelegate on the MySite to ovveride the default one. I just explained why it does not show. Modifying the out-of-the-box files will void Microsoft Support, so please don't do that :) –  Kjetil Gullen Aug 14 '12 at 12:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.