Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

User based customization of WSS site's navigation bar?

  Asked By: Glenn    Date: May 31    Category: Sharepoint    Views: 3897

Has any one seen a good approach for customizing a nav bar on a WSS site based on the person's site role/rights?

More specifically, being able to remove the "Create" nav bar item for those that are just Readers, for example? …without using SPS.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Jay Ruiz     Answered On: May 31

I've seen several approaches to security trimming, most are client-side
JavaScript hacks that hide the nav bar  item using CSS. I would not want
to be responsible for future support for these sites.

An Uber Admin page approach:
My preference is to obfuscate, centralize, and customize all
administrative functionality. create  a new "Uber Admin" page that
administrators can access via some known path like
/_layouts/1033/custom/admin.aspx. This page can be a basic HTML page, a
standard ASPX page, or even a Web Part Page including inline script. It
can be as dynamic as you like. It can have text that most corporations
want explaining who is authorized to use the page. It can also sport
links to all the favorite administrative areas of a site  organized the
way your organization wants to see them. If different groups in your
organization want different views you can include a different page in
each underlying site definition or use a Content Editor Web Part.

Then using the NavBars section of the ONET.XML file in the underlying
site definition by removing Documents and Lists, Create, and Site
Settings from the Top Nav.

Change this:
<NavBar Name="SharePoint Top Navbar" Separator="   "
Body="<a ID='onettopnavbar#LABEL_ID#' href='#URL#'
accesskey='J'>#LABEL#</a>" ID="1002">
<NavBarLink Name="Documents and Lists"
Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentUICulture.
LCID%]/viewlsts.aspx" />
<NavBarLink Name="Create"
Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentUICulture.
LCID%]/create.aspx" />
<NavBarLink Name="Site Settings"
Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentUICulture.
LCID%]/settings.aspx" />
<NavBarLink Name="Help" Url="javascript:HelpWindowKey("NavBarHelpHome")"
/>
</NavBar>

To this:
<NavBar Name="SharePoint Top Navbar" Separator="   "
Body="<a ID='onettopnavbar#LABEL_ID#' href='#URL#'
accesskey='J'>#LABEL#</a>" ID="1002">
<NavBarLink Name="Help" Url="javascript:HelpWindowKey("NavBarHelpHome")"
/>
</NavBar>

This leaves just Home and Help on the Top nav  (similar to the Meeting
Workspace). Or, if you want, you can include a Top Nav option called
Admin that links to this page:
<NavBar Name="SharePoint Top Navbar" Separator="   "
Body="<a ID='onettopnavbar#LABEL_ID#' href='#URL#'
accesskey='J'>#LABEL#</a>" ID="1002">
<NavBarLink Name="Help" Url="javascript:HelpWindowKey("NavBarHelpHome")"
/>
<NavBarLink Name="Admin"
Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentUICulture.
LCID%]/custom/admin.aspx" /> </NavBar>

This gives Home, Help, and Admin on the Top Nav. Most users (readers
included) will leave the Admin link alone. Even if they do click it they
will see the text about who is authorized to use the page. If they
proceed, they will eventually be told that they don't have access.

Of course, this doesn't change anyone's actual permissions, it merely
removes the temptation for users without sufficient authority to begin
down a road that they won't be able to complete.

 
Didn't find what you were looking for? Find more on User based customization of WSS site's navigation bar? Or get search suggestion and latest updates.




Tagged: