Todd Bleeker's 12 Hive

All MindsharpBlogs

Are you pondering what I'm pondering?

My Links

Post Categories

Archives

Blog Stats

Two Invaluable Windows SharePoint Services (WSS) Shortcuts

Near the beginning of my SharePoint Developer Class, I go thru eight Windows shortcuts that are helpful in setting up a development environment. I want to share two of them here in preparation for my coming posts.

On the Home page of a standard WSS Team Site you will find the Modify Shared Page link in the top right corner. It is generated from the server control:
included on the direct mode default.aspx page in the STS Site Definition in the 60 Hive.

You are probably familiar with using this smart menu on the Home page. However, there are other pages where its functionality can prove very useful. For instance, what if you wanted to add a Web Part to the AllItems.aspx page, the NewForm.aspx page, the EditForm.aspx page, or the DispForm.aspx page of any List or Document Library? To alter the contents of the Web Zones on these Web Part Pages you must open the site in FrontPage and at lease temporarily unghost the page, right? Not any more.

From Internet Explorer, view the source of the Home page of a standard WSS Team Site and search for Add Web Parts and you will see text like this:

This code defines each menuitem that will be presented in the Modify Shared Page smart menu. The menuitems presented here should look familiar. Under the text "Add Web Parts" in the code you can see "Browse", "Search", and "Import" followed by "Design this Page" and "Modify Shared Web Parts", etc. I'm going to focus on Browse and Design this Page, arguably two of the most commonly used options on the menu.

Choosing Modify Shared Page > Add Web Parts > Browse from the smart menu in the UI will run JavaScript:MSOTlPn_ShowToolPane('2')

Let's examine the command: The MSO presumably stands for Microsoft Office, the TlPn (that's a lowercase L not a 1 and unfortunately JavaScript is case sensitive) presumably stands for Tool Pane, and ShowToolPane is the specific method that we are executing. The required ViewID parameter identifies which Tool Pane view to show:

ViewID Tool Pane view to show
-1 Extensible View
0 Close task pane
1 Web Part Properties and Custom ToolParts
2 Add Web Parts – Browse
3 Add Web Parts – Search
4 Navigation (Downlevel only)
5 Add Web Parts – Import
6 Web Part Menu (Downlevel only)
7 Error

For more information about what you can do with MSOTlPn_ShowToolPane check out the Customizing Task Pane Views section of the MSDN Article called Modifying the User Interface for Web Parts and Web Parts Pages.

If we create an Internet Explorer favorite (shortcut) that executes this JavaScript, we could browse to the Add Web Parts ToolPane on any WSS Web Part Page. So, on any page in Internet Explorer:

  1. Choose Add to Favorites from the Favorites menu. Don't worry about which page you are marking as a favorite, we will be changing the URL anyway.
  2. Name the new favorite Add Web Parts - Browse.
  3. Choose the folder, if any, where you want the favorite. I like to put these favorites into the built-in Links folder, but you can really put it anywhere you can find it again.
  4. Click OK.
  5. Find the favorite you just created, right click on it, and choose Properties at the bottom of the context menu.
  6. Replace the contents of the URL field with JavaScript:MSOTlPn_ShowToolPane('2')
    Remember, JavaScript is case sensitive so be precise.
  7. Click OK.
  8. Click Yes on the Problem with Shortcut confirmation dialog. It expects protocols like http, https, and ftp so it doesn't understand JavaScript. That's OK, it will still work.

Choosing Modify Shared Page > Design this Page from the smart menu in the UI will run JavaScript:MSOLayout_ToggleLayoutMode()

We will repeat the same basic steps to create the second shortcut. So, again, on any page in Internet Explorer:

  1. Choose Add to Favorites from the Favorites menu.
  2. Name the new favorite Design this Page.
  3. Choose the folder, if any, where you want the favorite.
  4. Click OK.
  5. Find the favorite you just created, right click on it, and choose Properties at the bottom of the context menu.
  6. Replace the contents of the URL field with JavaScript:MSOLayout_ToggleLayoutMode()
    Again, JavaScript is case sensitive so be precise.
  7. Click OK.
  8. Click Yes on the Problem with Shortcut confirmation dialog.

Now, navigate to any Web Part Page and choose one of your new favorites. Viola, the page jumps into the correct mode, even if the Modify Shared Page smart menu isn't showing. On a SharePoint Portal Server Area you will need to first get into Edit Mode to run these JavaScript shortcuts.

Finally, note that the Design this Page favorite is a toggle. So, the first time it is chosen it will put the Web Part Page into Edit Mode, the second time it will return the Web Part Page to View Mode.

posted on Friday, February 11, 2005 4:35 PM

Feedback

# re: Two Invaluable Windows SharePoint Services (WSS) Shortcuts 2/18/2005 12:47 PM TM

Cool. Thanks.

# re: Magic SharePoint URLs 3/10/2005 12:20 PM Chris' Comments

# re: Manage web parts within a listpage 7/22/2005 5:39 AM Andrew Connell [MVP MCMS]

# WSS menu shortcuts from inside IE 8/16/2005 1:28 PM SharePoint


Two Invaluable Windows SharePoint Services (WSS) Shortcuts



Near the beginning of my SharePoint...

# re: Open List Items in a New Window (_blank) 8/30/2005 5:00 PM Todd Bleeker's 60 Hive

# Content Editor Web Part (CEWP) Series 10/25/2005 2:01 PM Todd Bleeker's 60 Hive

# Content Editor Web Part (CEWP) Series 10/25/2005 3:08 PM Todd Bleeker's 60 Hive

# re: Two Invaluable Windows SharePoint Services (WSS) Shortcuts 11/10/2005 3:40 PM Ryan

Does anyone know how to chang the default image of the "checkmark" that shows when an menuitem is checked! ie. I want to use my own and don't know how?

# SPClientUtilities - toggle edit mode or show tool pane anywhere 5/2/2007 9:26 AM Andrew Connell [MVP MOSS]

SPClientUtilities - toggle edit mode or show tool pane anywhere

# Sharepoint Weekly 4 5/4/2007 12:52 AM Arno Nel 2.0 - the Strategic Architect

Fellow blogger Amanda Murphy is INETA president elect ! The SharePoint Solutions Blog releases the Site

# Hello Here! 10/29/2009 9:02 AM lirmkneerly

Hello!
New here and first post.
I am girl, 24 years old from Ireland
I enjoyed here.

<a href=http://sencillamentesimple.wordpress.com/2009/07/22/acai-berry-nuevo-engano>Botijos</a>

#  Xrumerservice.weebly.com offer xrumer service obtain backlinks! 12/7/2009 12:55 AM pavypaype


Hello! amazing news I discovered site which run xrumer service! members used service at site <a href=http://xrumerservice.weebly.com>xrumer service</a>
??? I decided to get out it. Is it reliasable to get new vistors in that way? I want to push my website in better search results!

# What is the best IT automation software out there? 12/22/2009 10:20 PM SemAnceneWet

Can anyone recommend the top performing Remote Management tool for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: <a href="http://www.n-able.com"> N-able N-central performance management
</a>? What is your best take in cost vs performance among those three? I need a good advice please... Thanks in advance!


Comments on this post are closed.
Title  
Name  
Url
CAPTCHA
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments