CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Hide my site link with css

Want to hide my site link without disabling social features.
my site link

Well, the simplest way to do it is to use css:

#mp1_0_0_Anchor { display: none; }

If you want to hide my profile instead, just hide #mp1_0_1_Anchor:

#mp1_0_1_Anchor {
    display: none;
}

As John and Vishal mentioned, it doesn’t work, because these IDs are generated dynamically. If you have to hide this link, you must use attribute selectors like:

.ms-MenuUIUL li[text='My Site'] { display: none;}
Disable the my profile feature
An even better solution is maybe to disable the ability to change the profiles. Just remove the permission to “user personalization…” for All authenticated users in User Profile Service.

Advertisements

9 responses to “Hide my site link with css

  1. John 2012-03-07 at 00:15

    Be careful this cannot be used, the classes for pop up menus are generated dynamically on the page, and that class can be applied to a number of menus I assume depending on the order which they load on the page, which isnt the same every time, so for instance this hides something in the site actions menu, or the new button on a library sometimes.

    • Anatoly Mironov 2012-03-07 at 09:10

      You are totally right, John! I realized that too. Fortunately, I didn’t need that then. But while using that I saw that sometimes Site Actions -Edit Page disappeared. These IDs are really generated dynamically. Thanks for your comment. I’ll update my post.

  2. vishal 2012-03-07 at 07:27

    Hi Anatoly. Thanks for the solution. but the problem we are facing one problem after implementing this.
    Once we make this change and when login to the portal next time, the “Edit Page” link under site action menu is not getting displayed and the My Site Link is getting displyed. any suggestion?

    • Anatoly Mironov 2012-03-07 at 09:24

      Hi Vishal. Unfortunately we cannot rely on these IDs, as John in previous comment mentioned, because these IDs are generated dynamically. I’ll update my post. One possible solution would be use attribute selectors… Something like .ms-MenuUIUL li[text=’My Site’] { display: none;}

  3. Fredrik 2012-03-09 at 15:27

    Thank you Anatoly, that worked perfectly in all browsers! I had problems with the first suggested solution, because it would hide other menu items, like “edit this page” from the site settings dropdown!

  4. Brett Anderson 2012-05-02 at 06:13

    Hi, The amended solution does not work in IE7.

  5. Pingback: Material SharePoint » Hide ‘My Site’ Link from Welcome User Dropdown Control

  6. jim 2014-02-12 at 17:38

    .ms-welcomeMenu #mp1_0_0{
    display:none;
    }
    .ms-welcomeMenu #mp1_0_1{
    display:none;
    }
    .ms-welcomeMenu #mp1_0_2{
    display:none;
    }
    .ms-welcomeMenu #mp1_0_3{
    display:none;
    }
    .ms-welcomeMenu #mp1_0_4{
    display:none;
    }
    .ms-welcomeMenu #mp1_0_8{
    display:none;
    }
    .ms-welcomeMenu #mp1_0_9{
    display:none;
    }

    these work for me.

Leave a Reply

Fill in your details below or click an icon to log in:

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

Discovering SharePoint

And going crazy doing it

Bram de Jager talking Office 365, SharePoint and Azure

My view and thoughts on Productivity and more.

My programming life

and everything in between

SharePoint Development Lab by @avishnyakov

It is a good place to share some SharePoint stories and development practices.

SharePoint Dragons

Nikander & Margriet on SharePoint

RealActivity - Real-time and trustworthy

Blog site of founder, RealActivty - Paul J. Swider

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points!!

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode, ya mama

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know about SharePoint - CommunicoCuspis

%d bloggers like this: