« Lots of new MSDN ASP.NET 2.0 Content | Main | SharePoint Portal Server (Service Pack 2) »
How many of you have at one time or other been annoyed by typing (and mis-typing) _layouts/1033/blah blah? Yeah me too, it used to drive me crazy. That's why I created this.
I found myself doing it so often that I packaged up a .DWP to do it for me, pretty basic concept but it can save you a couple of grey hairs.
What is is?
It's content editor web part (not a real web part) with some custom code to create a css drop-down menu that holds the common links like; creating lists, libraries, managing users etc.
Being that it's completely CSS driven menu it's easy to customize. There is a tidbid of getElementbyID Javascript that IE needs in order to put a pseudo class :hover on a list item.
The menu/javascript are based on the suckerfish dropdown
How do I use it
I created an HTML page with everything needed to run the menu ( the CSS, Javascript and the HTML) so that you can see how it works.
1) You can download and install the .DWP file just as you do with most web parts.
If you do this please download the menu page, upload it to your own server, then point to the file in the web part by modifying it's properties and changing the "Content Link".
2) You can copy/paste the code required into your own content editor web part. Read below if you do this
Important:
The content editor web part applies the .ms-WPBody class to a div which holds everyting in the web part body so depending on how you want to use it you may need to modify your theme, and or the css included (example: div.ms-WPBody .yourclass).
3) You can pick it apart and do what you like with it. You may want to use bits and pieces, create a better web part and give only those w/ permissions to perform the functions access to it.
You may want to implement the CSS into a theme, and add the JS to a javscript, use alternate CSS/JS, or any other number of things that might best suit you. Whatever it is you decide it's ok with me.
Download the HTML File | Download the DWP
TrackBack URL for this entry:
http://www.graphicalwonder.com/cgi-bin/mt-tb.cgi/134
Very nice! However, after importing the .dwp into a test site's home page, the default font on the page hosting the web part changed! Looks like its the same font as the one used by the web part.
Hey Eric,
It has to do with the .ms-WPBody class I am pretty sure. That class is applied to a div which the web part body gets wrapped in.
In theory if you added div.ms-WPBody before the classes it should work, however I quickly tried it and it didn't. (go figure).
I will take a closer look at it and create a better implementation. It has to do w/ the order the CSS is being read obviously.
If you just download the HTML file, and then link to it via the content editor web aprt it should be fine.
** Update **
I created a test site just now, imported the DWP and it seems to work fine for me with the exception that the font is slightly smaller. If you want to give the font a pixel size like font-size=11px it should be fine as well
Oops, I didn't read your problem properly. The * is causing that.
To fix this, remove this from the styles:
* {
font-family:Georgia, Verdana, Arial, sans-serif;
font-size:1em;
}
But before you do, you will want to add a the font-family and size to the lists, unless you prefer a different font, in which case whichever you prefer.
Hope that helps,
Shane
Hey Eric,
I'm a bit confused with a thing.
Your 'webpart' is working well but it seems that I can't place the menu to the extreme left of any section.
The first item is around 1,5 cm from the extreme left of my section (webpart section).
It seems you have the same problem on your page.
So do you know why we got this ?
Best regards and thanks for this hints,
Marc
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |