This must be the best theme available currently. I think it would be great if the Primary Links supported child sub-items that displayed in the small area under that tab when it is active. It would look the same way the secondary links look but only show when the parent tab is active.

Is this possible? I think it would be a great feature addition for a future version.

Thanks for the great theme!!!

Comments

dnewkerk’s picture

I was about to post a request for the same feature. It would be great if the secondary links could display underneath the primary links tabs (in the "feature" bar area), instead of at the top. Having it under the tabs is (in my opinion) better for usability, and tends to be the conventional place where tab sub-navigation is placed on most websites (and adhering to well established conventions is an important consideration in usability). I don't think the "average" user will consistently be able to catch the relationship between the primary and secondary navigation when they are split apart, and with the secondary navigation appearing now "before" the primary navigation in the page flow.

I've been trying to adjust the theme to accomplish this myself, but have been having trouble getting it to work. I've managed to get secondary links to display in the "feature" div, but due to not understanding some of how the theme's CSS/code works, can not seem to get it to stick in a static location underneath the primary navigation tabs (e.g. as you scale the browser size, the tabs stay in place, but the secondary navigation moves away from the tabs).

Anyhow, thanks for the great theme... even if you decide not to modify the original theme to have this feature request, it would be great if you could help us by posting some optional code changes that we can apply ourselves to get the desired result (since you know the theme's code well and are definitely better at CSS than I am haha, I figure this may be relatively simple for you).

Thanks!

j0k3z’s picture

Instead of moving the secondary links a new menu should just be created.

Personally I like the current secondary links position for a few links like "Contact" "About Us" and "Signup" but would put additional more important secondary links in the featured block. I also tried to do this on my own, and had some success but I couldnt get the css to look decent enough in that area.

dnewkerk’s picture

It could be that my understanding of Drupal's menu system is... incomplete :P
Though from how I understand it, "secondary links" is Drupal's way of referring to the sub-links that are direct children of the Primary links menu (e.g. there isn't an actual "secondary links" menu... secondary links are just the children of the top level Primary links menu. In terms of information architecture, I think it is most appropriate (again, if my understanding of Drupal's menu system is correct) that secondary links continue to be related to primary links in this way, and not an "other" separate, unrelated menu. It would be more appropriate to exchange the current placement of where secondary links appear for a separate menu like what you're referring to (this is often referred to as the "utilities" links... links that are not part of the site navigation, but are supplemental tools that are available to the user - a good description can be found in Steve Krug's "Don't Make Me Think" book on web usability). Since this is the way Drupal already works, I think it's best to maintain that convention in the Deco theme as well.

Anyhow, I plan on rewriting my code in a more eloquent way, but I did manage to use a trick to get the secondary links where I wanted them. It's not the best way, but until I have time to redo it, it's what I have :) It's the wrong way to do it, but I was in a time crunch. I'll try to post the relevant code snippets and hopefully it will get you started for now.

You'll probably have to adjust the positioning numbers since my header image is taller than the default (and I also made it into a CSS background instead of the img tag in page.tpl.php... I'll try to include my additional CSS so you can see what I changed). I can't post the site's url yet since it's still on my local server.

layout.css

#header {
  height: 182px;
}

#top-bar ul.secondary-links {
  margin:0;
  padding:0;
  float:right;
  height: 22px;
  display: inline;
  position: relative;
  top: 184px;
}

#header h1 {
  height: 160px;
  margin: 0;
  position: absolute;
}

#header ul.primary-links {
  height: 45px;
  float: right;
  margin: 115px 0 0 0;
  padding: 0;
  position: relative;
}

#featured {
  min-height: 26px;
}

I think those were all the changes. Again, this is not the right way to do it, but can work for now. When I recode it it will place the secondary links in a new div underneath primary links and let the top-links area stay where it originally was (where an additional custom menu can then be printed).

klaasvw’s picture

Priority: Normal » Critical
dcoffee’s picture

Assigned: Unassigned » dcoffee
Priority: Critical » Normal

I was working on this issue a bit in a template. I display the active submenu navigation as a bar underneath tabbed Primary Links.

It's a work in progress but a decent starting point.

I'd like to add mouseover submenu capability to the tabs, especially if we could keep a horizontal menu.

Template on my live demo site
http://www.buffalourban.com/testdrupal/

add1sun’s picture

Title: Possible to add support for sub menu items in Primary Links? » Change secondary link location
Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: dcoffee » Unassigned

One problem with changing the secondary link location at this point is that many sites are already using it as is. If we update the theme to move them, it will mess sites up that are expecting it where it is now. We could do a V2 of the theme where we make a significant change like that and make it clear to folks that if they upgrade to V2 it will change the layout a bit. Then in D7 we could move to that being the only version available.

All in all, I agree that secondary links should be displayed in a way that the relationship to Primary links is apparent and the "feature" bar area makes more sense to me. Not sure on the best way to proceed though, so as to not screw a lot of people up.

elopio’s picture

I agree. I like the current place of secondary links; but they are hard to see.
Is it possible to have both locations? I don't know, something like having the secondary links on the featured area by default, and change some variable to display them on the header.

add1sun, thanks for your work. I really like this theme :)