Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Adding menus to my master page. How?

  Asked By: Jerry    Date: Jan 10    Category: Sharepoint    Views: 1806

On our intranet portal we're going to have a top level site and a whole
bunch of sub sites that all have pages that need to have the exact same
set of menus on them.

I figure these should be added to the master page that is used for all
of these sites.

However, if I hard-code the menus into the master pages, I don't think I
can modify just one master page and update every single site with it,
can I?

What are my alternatives? It seems that the built-in navigation controls
require the use of the sitemap XML files to work. However, those are
stored in the file system of IIS and seem rather impractical as folks
would need both a) server access and b) knowledge of XML when they need
to be updated.

I tried using a server side include, and just uploading a simple HTML
snippet to a document library, but I get an error:

The include file '/admin_templateincludes/mynavlist.html' is not allowed
in this page

Even though the list is set up for read-access to everyone.

Can one use Server Side Includes to grab a file from a document library?

I'm at a complete loss here. Any suggestions appreciated!

Share: 

 

7 Answers Found

 
Answer #1    Answered By: Alexis Ellis     Answered On: Jan 10

Actually the built in navigation  uses serveral SiteMap objects that are
populated from SharePoint database.

You could hardcode the menus  in one master  page and update  every site,
as long as no one edits the Master Pages using SharePoint Designer and
unghosts them. Once that happens you can't update the central copy and
have them apply anymore.

You can't use a server  side include  from the file  system because the
server is pulling everything from virtual directories in the database.
It won't recognize a physical server path you create. You could try
putting it out in a directory under the Template/Layouts directory of
the 12 hive. That can be referenced using a relative address of
_Layouts/custom/ at runtime.

 
Answer #2    Answered By: Percy Beach     Answered On: Jan 10

> You can't use a server  side include  from the file  system because the
> server is pulling everything from virtual directories in the database.

Do you know why one can't use a SSI when referencing a file in a virtual
directory while you can with the LINK tag (to grab a CSS file, for
instance?)

I assume it's due to SSI's being an IIS-level thing, but am just
curious.

 
Answer #3    Answered By: Mary Adams     Answered On: Jan 10

If you top  level site  is a publishing site, you can use the "Apply to
all subsites" option to do this. If it is not, you can go the route of
using/editing the ghosted version of the master  page discussed in the
last few days. Master Pages are the correct technique from a SharePoint
point of view, it's just a matter of getting the details right.

 
Answer #4    Answered By: Kundan Jambhale     Answered On: Jan 10

> If you top  level site  is a publishing site, you can use the "Apply to
> all subsites" option to do this. If it is not, you can go the route of
> using/editing the ghosted version of the master  page discussed in the
> last few days. Master pages  are the correct technique from a
SharePoint
> point of view, it's just a matter of getting the details right. J

What if... ;o)

1) The top level  site is a publishing site, but sub sites  will be team
sites?

2) I decide to make a separate master page  for all the subsites?

Regarding #1, we're really not sure yet, as they are still deciding what
the department subsites should be. If we do decide to make them team
sites, can they still inherit a masterpage from a publishing site? Can
that masterpage be updated  later and apply to all?

Regarding #2, I'm thinking the easiest thing for me would be to just
maintain two masterpages. One for the top level site, one for all the
sub sites. Should I just have two masterpages in the top level site and
have the subsites inherit from that?

As it is now, in the name of just getting a masterpage out so that
content folks can start populating our intranet, I'm thinking of just
hard coding these menus  in to the masterpages and living with the fact
that they don't maintain 'you are here' states at this point.

 
Answer #5    Answered By: Alyssa Butler     Answered On: Jan 10

#1, yes. If you use the "Apply to all" it will force the master  page
down to everything, including team sites.

#2, you'll need to either create a new site  def/site template for the
subsites containing the 2nd master page, or do something to update  them
to use the new master page  post-creation. The "Apply to all" can't be
used for that scenario.

 
Answer #6    Answered By: Katy Patton     Answered On: Jan 10

> #2, you'll need to either create a new site  def/site template for the
> subsites containing the 2nd master  page, or do something to update  them
> to use the new master page  post-creation. The "Apply to all" can't be
> used for that scenario.

I'm thinking we need to go this route, now. The template will definitely be
different than the top  level site.

Now, if we make a site template for the above, can we updated  it later and have
it auto-apply to all sites? Or does each site then have to be manually updated
if the template's master page is updated?

 
Answer #7    Answered By: Ana Payne     Answered On: Jan 10

If you go the route of using a ghosted master  page and make changes by
replacing the master page  resources on the file  system it should work.
Keep in mind that route does have some caveats (e.g. changes will need
to be done individually on each web front end and/or done via a
deployment package, and they won't be backed up as part of any of the
built-in SharePoint back/restore/export/import options).

 
Didn't find what you were looking for? Find more on Adding menus to my master page. How? Or get search suggestion and latest updates.




Tagged: