How do you add a menu tab to Community Server 2007?

This post has 8 Replies | 4 Followers

Top 150 Contributor
Posts 137
Points 1,580
KevinTunis Posted: Fri, Apr 20 2007 3:36 PM

How do you add a menu tab to Community Server 2007?  Is it the same as http://communityserver.org/forums/t/460742.aspx

Kevin Tunis

Top 25 Contributor
Posts 1,539
Points 14,730
MVPs
X.Static replied on Fri, Apr 20 2007 4:25 PM

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).

  • | Post Points: 20
Top 150 Contributor
Posts 137
Points 1,580

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 Tunis

Not Ranked
Posts 2
Points 25

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:

  1. How to add three pages similiar to the home page in the root (i.e site.com/page1.aspx), where I can copy the design of the home page, but customize.the sidebar content for those pages so they are unique.

    My assumption is that the article system doesn't work well because at best each page would share the same sidebar content (fixed).  Which leads me to which page do I need to customize for articles skin if that is the only solution?
  2. SelectedNavigation Hack - Once I can solve the above issue, how can I have it be the selected tab in the header menu?  I can't follow how the 2.0 way works in CS 2007 with the selected navigation hack. I had it working with a test site in 2.0 just fine...but I'm not a very good programmer.
  3. Frame Header Page, is their an easy way to add a frames page under the CS header (I don't need it "selected" as above)?  I want to keep the the header, menu tabs, etc of my CS site, but everything under the header would be a web 2.0 online billing / time tracking for my clients. I found this very cool web based time tracking, billing, and invoice software called FreshBooks ... but want running underneath the common CS header.  Is this possible?

    I would assume I can do a custom frames page If I can solve problem # 1 some how. My only concern is that the external site is SSL, which means I might not be able to display both pages because I only use SSL for login...but I don't hink I can have secure and unsecure content with giving the user prompts.

    On the same note as a feature request if any Teligent Wizards stumpble on this post.  Ideally, the Admin would just need to add the url to a CS control panel applet like "External Sites" near the article sections in the UI.  Actually, it could share a lot from the articles features (page and titles), but: replace the body text of an article with a framed external site URL, and have code to dynamically create a frames page based on the page name, title, and external url.  It would help simplify connecting external web applications of the web 2.0 world under one roof, while maintaining site branding.

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

 

Top 150 Contributor
Posts 137
Points 1,580

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.

Kevin Tunis

  • | Post Points: 35
Not Ranked
Posts 2
Points 25

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.

  • | Post Points: 5
Top 10 Contributor
Posts 4,137
Points 77,095
CS Developers

Kevin,

Have you seen this thread, it may be useful? 

Jayson Knights CS Tidbits #26 -- Harness The Power Of Config File Overrides

Rick Reszler


  • | Post Points: 20
Top 150 Contributor
Posts 137
Points 1,580

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 

 

Kevin Tunis

  • | Post Points: 20
Top 10 Contributor
Posts 2,517
Points 28,655
MVPs

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.

Four Roads

  • | Post Points: 5
Page 1 of 1 (9 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com