How do you add a menu tab to Community Server 2007? Is it the same as http://communityserver.org/forums/t/460742.aspx
It's a pretty easy process...add a line to your SiteUrls.config file in the <navigation> element. CS 2007 introduces the notion of 'override' files where you can add items to configs in a separate file so that it's easier to reuse, however you can't do this with the <navigation> element because you have no control over the order they are displayed in then (override files are processed first, so if you define a custom tab it'll show up before all the other ones).
Snag yourself a CS Tidbit!
How does the URL rewrite work with the default page to web/themes/[THEME NAME]/common/home.aspx work? The reason I ask is that I want to have a new menu item under a different directory but I want to rewrite it to a page in the theme.
Kevin, thanks for asking this as I have been lurking here for a few days playing with CS 2007 and trying to figure out how CS 2007 works with addditonal pages. I have installed CS2007 and have it working well with GoDaddy's economy plan with an ~$65 w/SSL cert or the year....not too shabby.
I played round with it in the 1.0 and 2.0 days....more of a hobby, never started blogging. So I do remember some tricks...but need some things re-framed for 2007. Could someone help me explain:
Sorry for the long list of questions...but have tried searching these with no luck..and feel frustrated, tired, and confused.
Thanks in advance,
John
Okay, let me see if I can get this said so that it makes sense. If in the root directory web/, I create another directory web/services/ and then create a default.aspx with this in it;
<%--
This page is a placeholder for URL rewriting.
The content of this page is defined by the theme associated to this
site and is located at web/themes/[THEME NAME]/common/services.aspx
--%>
Just like the default of the root, rewrites the default.aspx to the home.aspx, we want the web/services/default.aspx to rewrite to web/themes/[THEME NAME]/common/services.aspx. Then we want to add this redirected page to the menu tab. My assumption is that this is done in the SiteUrls.config but I am not sure where.
Now with your question John, you should be able to copy the home.aspx and paste, and then rename the copy of home.aspx to whatever page you want. In this example lets change it to services.aspx in the web/themes/[THEME NAME]/common/ location to follow with the above explanation. To keep side content items from repeating, you should be able to change the controls ID.
Thanks for the help Kevin...I'll try the rewriting logic later today.
As for the menu bar, just add a entry in siteurls.config, scroll all the way to the bottom for the <Navigation> section. Add an line like this in between the other tabs headers...in my case, since I can't get the custom pages working just yet, I'm linking to an articles page I created.
<navigation> <link name="home" resourceUrl="home" resourceName="home" roles="Everyone" /> <link name="consulting" navigateUrl="/content/Consulting.aspx" text="Consulting" /> <link name="blog" resourceUrl="webloghome" resourceName="weblogs" roles="Everyone" applicationType = "Weblog" />
Order of the navigation section is coded top down and equals left right, so order is important. Next, now how can we keep that tab selected when we click on it? Something to do with the SelectedNavigation hack in 2x.
Kevin,
Have you seen this thread, it may be useful?
Jayson Knights CS Tidbits #26 -- Harness The Power Of Config File Overrides
Rick Reszler
Rick,
Does this work when creating a vertical menu? For some reason when I do an override, I lose my vertical navigation. In other words this should work whether you using it for a site theme or a single blog theme.
see my post on vertical navagation http://kevintunis.com/archive/2007/04/20/creating-a-vertical-site-theme-in-community-server-2007.aspx
A correctly-defined override file shouldn't break your navigation list, whicherver you've elected to render it. You can test your override file against your default navigation control first and ensure all links are displayed as expected, then insert your custom version and check again.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com