Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Header User Control

  Asked By: Phenil    Date: Mar 29    Category: Sharepoint    Views: 990

I have a header user control (.ascx) to replace team site header. I can
display user control using Jan's Smart Part as a web part, Requirement
is to display it at the top of the page and add it a custom site
definitions. Any Ideas?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Judy Pittman     Answered On: Mar 29

It is frustrating that it is so difficult to customize the header  in
SPS2. I had to resort to the same approach, as described below:

Towards the top  of default.aspx in my custom site  definition, I have
registered the control  with a line like this:

<%@ Register Tagprefix="CramerNetCtrl"
Namespace="Cramer.SharePoint.CramerNetControls"
Assembly="Cramer.SharePoint.CramerNetControls, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=zzzzzzzzzzzz" %>

... then the first row of the page  table contains an entry like this:

<CramerNetCtrl:CramerNetHeaderControl id="CramerNetHeader1"
runat="server" />

Finally, web.config must have a trust entry such as

<SafeControl Assembly="Cramer.SharePoint.CramerNetControls,
[....] PublicKeyToken=zzzzzzzzzzzz"
Namespace="Cramer.SharePoint.CramerNetControls" TypeName="*"
Safe="True" />


This is the best way I know of to customize the header. Mine spits out
HTML to render logo and a toolbar, with a couple different options
depending on context.

The big drawback (and it's quite annoying) is that to make this
universal you would have to also customize all of the various pages in
the _layouts folder that are not part  of the site definition.
(Unfortunately, search and replace  is not an option as they are written
in a number of ways) This is true for any site definition mods, but I
have avoided touching the _layout pages, because of the effort to make
and maintain the changes (patches will likely destroy your
customizations there). This means that some features, like the toolbar
rendered by my header control as well as an absolutely-aligned DHTML
utility layer that's also in my site def are available on most of my
portal pages but not found on any of the _layout pages like "upload
document". It's a bit confusing for users and I'm really hoping that
V3 addresses this using the parent page feature of .NET2 that I've
heard about.

High-touch customization is far too difficult and messy in the current
version, but if a company spends a bundle deploying a corporate portal
they will naturally want it properly branded.

 
Didn't find what you were looking for? Find more on Header User Control Or get search suggestion and latest updates.




Tagged: