Sunday, August 19, 2012

Sharepoint Allow Customization to users

A lot of people don't realize just how easy it is to create their own “Modify Page” link/button/whatever.... All you really need is something that can have an onClick event.... For example, here's a “Modify Page” button, drop this into a Content Editor web part, strip off the web part frame and you're done...
<input id="btnModifyPage" type="button" class="UserButton" onClick="javascript:MSOWebPartPage_OpenMenu(MSOMenu_SettingsMenu, this);" value="Modify Page" />
So simple, so easy, right? Now because this isn't the actually WebPartPages:SettingsLink web part it will not change text from “Modify Shared Page” and “Modify My Page” depending on the page view you're on.... For most users I don't find that a problem anyway, thus the button text here is “Modify Page” Nice and generic. The functionality is the same however, if a use has access to modify both a personal page and a shared page they can do both from this button..... The javascript command is the same in either case.

Sharepoint Tweeks and tricks

Is this even possible, some might wonder? Well it is, via querystring options on the command line:
Add Web Parts/Browse ToolPaneView=2
Add Web Parts/Search ToolPaneView=3
Edit Mode mode=edit
View Mode mode=view
Shared Mode PageView=Shared
Personal Mode PageView=Personal

So for example, say you wanted to edit the Shared view of the default page:
default.aspx?mode=edit&PageView=Shared
Say you wanted to Browse web parts and add them to your Personal view:
default.aspx?ToolPaneView=2&PageView=Personal
You can mix and match, and the order of the options do not matter....
Hope this helps
-Andy

Followers

No Locks without Key

🌿 Bible Verse 1 Corinthians 10:13 "No temptation has overtaken you except what is common to mankind. And God is faithful; ...

Who Am I?

My photo
What is mankind that you are mindful of them, human beings that you care for them? Psalms 8:4 But he made us a little lower than Angels and Crowned with Glory and Honor. How majestic is your name in all the Earth Oh Lord our God!