Tuesday, June 24, 2008

Hiding quick launch bar in MOSS

Hi All,

There is a way you can hide a quick launch bar in MOSS 2007.

Here are the steps to follow:

(1)Add content editor webpart on page
(2) Click on Modify shared webpart
(3) Click on source editor button
(4) Copy and paste the following HTML

<style>
.ms-quicklaunch
{
display:none;
}
.ms-navframe
{
display: none;
}
</style>

(5)Go to layouts section of that webpart and select Hidden.

That's it. Now no more quick launch bar !!!!!

If you want to get quick launch back, just again edit the page and go to modify shared webpart of content editor webpart. Go to source editor button and remove all HTML content and save it.

That's it. Now you will have your quick launch back in place !!!

14 comments:

Anonymous said...

Hi Malay,

This posting is great and working fine.. But can we hide some links under quick launch dynamically thru coding (say for example: i want to hide few of the links basing on the user logged in.)?

Thanks,
Amar

Malay Vasavada said...

Hi Amar,

That's great that it worked. Ok you can dynamically hide links from quick launch bar but there is one limitation, because Quick launch is common for all users, you will never be able to hide the specific link in real case. you can detect who is logged in and based on that you can hide it but if more than one user logged in at same time then this causes problem as quick launch is common for all.

I think if you can give me your scenario then i can look forward and give you solutioning that how to do it dynamically depending upong where you can write your code.

Are you creating site synamically or you have one site and at the time of Default.aspx loads you want to hide links.

Give me scenario, so that i can tell you perfactly.

Thanks,
Malay

Anonymous said...

Hi Malay,

Thanks for responding so immediately.. :-).
My scenario is, I have a site existing, and at the time of Default.aspx loads I want to hide links.

Thanks,
Amar

Malay Vasavada said...

Hi Amar,
I got your point, but one question that i have is. what kind of configuration for showing or not showing link to specific user, are you fetching it from any master list at site level or its a static rights given to individual user for showing/hiding?

We are going to post for this solution by today evening. you can check for the same at late evening.

Thanks,
Malay

Anonymous said...

Hi malay,

It is static rights given to individual user for showing/hiding links under quick launch...

Let me put it this way..

If my site has two users A and B. When b logs-in, he shouldnt be able view the link for the document library created by user A and vice versa.. This is just an example i gave you to explain my requirement..

Thanks,
Amar

Anonymous said...

Hi Malay, this may be a different question but please let me know if you know the answer. I have a content editor web part and I want to have programming access (thru object model) to the content of the the Content Editor web part. How can I achieve this?

TIA,
Paresh

Friends Network said...

Hi malay,
Your post is interesting. I have a completely different question to this post. I am working on master page..in SharePoint designer. I have created a sitemap and uploaded into layouts folder, modified web.congig file and SHarePoint:AspMenu control in SP Designer.
Here the question ....when i mouseover on a tab..I would like to see the links as two or three columns. For example If i have 30 links under one tab/button , when I mouse over on that, it is showing me all links vertically from top to bottom and my whole page is covered with the flyout dropdownmenu.
Instaed of showing that I need to split them as 2 or 3 columns when i mouse over on the tab I should see those columns and links at a time. Do i need something in the sitemap file or css file???

Thanks.
Venkat

SharePoint Kings said...

@FriendsNetwork: we got your requirement.

you can refer this link for your reference.

it is using JQuery. you can get idea from that method. we will share Full CSS and Javascript code once we get time.

Anonymous said...

Hi,
I need help to hide the quick launch bar on a publishing portal that is using BlueGlassBand.master template. Your solution works great when I use defaultmaster template. In my case I have to use the BlueGlassBand.master or BlueBand.master templates. Any help will be greatly appreciated.

Thanks,
Nee

SharePoint Kings said...

@Anonymous,
you can check how quick launch will render in BlueGlassBand.master by using firebug in firefox or IEDeveloper toolbar in IE and find which style to make display none.

sandeepkilaru said...

Hi Malay,

Can we hide the specific links in the quick launch. In my case i have around 7links in the quicklaunch I want to hide only three of them. Is it possible to do that?

thanks in advance

SharePoint Kings said...

its default functionality of sharepoint that you can add/remove links in SharePoint.

go to site setting-->navigation

Anonymous said...

Is this best Microsoft best practice? This sounds more like an old myspace theme hack with CSS. Surely the best solution would be to create multiple masterpages/page layouts no?

SharePoint Kings said...

no its not best practice, but there are few scenario where our portal in production and we are not able to publish master page so frequently as we thought(it required lot of permission,approval,moderation and testing)

in that case we can use this kind of javascript sort cut for time being.

best practice is create a new master page or put control in SPSecurityTrimmed control.




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com