By mondrawy on
I'd like to be able to create a tabbed menu much like the one here on Drupa.org with "Documentation/Download/support....." ...etc. I figure the best way to do that would be to create a menu with each node that I want, however some of the stuff I want up there aren't nodes. Specifically the forums, unless I'm missing something it seems that the forums aren't counted as nodes and therefore I can't include a node ID for its path. The easy way out would be to include an explicit path to the forums but explicit paths on webpages are usually not a very good practice so is there another way around that ?
Comments
=-=
what you see on drupal.org are primary menus from administer -> menus
there are menu items (links) that can be enabled and moved in all of the menus available.
to point a primary menu to the forums you would use forum as the path for the menu item. Though prior to creating a new menu item I'd make sure it isn't already included in one of the other core menus and is just disabled.
I don't understand the idea that "explicit paths aren't good practice", as far as google, other search bots and anyone viewing your site is concerened, yoursite.com/forum is a page even though it doesn't have a node ID because it isn't a node.
None of my sites use nid's at all, I prefer paths and use the pathauto.module to handle conversion of nids to paths which make it much easier to remember direct links. Drupal.org itself also uses direct links to the path for the forum link in primary links as well as every other primary link in the primary menu.
Thanks for the quick reply, I
Thanks for the quick reply, I usually prefer to use relative paths in anything I do since its less likely they'll break in the long term. This is especially useful when doing testing on a backup installation since the paths would have changed.
As for the primary menu, the forums weren't included in there before so thats why I wanted to know how to add one. Now that its added I'm having a different problem, I'd like to be able to have a tabbed/button look like the one on drupal org. However when I place the primary menu block its contents are all listed underneath it much like "Contributor Links" instead.
=-=
primary menu block ?
you don't need to enable a block for primary menus. That block is meant to be placed in a region like the sidebars, as far as I know. primary menus are set in administer -> menus and you don't need a block to enable them. Unless your theme wasn't built to support primary menus the way core intends them.
to style the primary links you would use css. you can use the firefox browser with the firebug addon to inspect drupal.org's elements and mimic.
using relative paths is exactly what you do with drupal and its menu system everything is relative to index.php
thus a menu link to forum, is simply - forum
If you were to alias forum for some reason, I believe you would still have the ability to get to forum, using forum, though this may count as duplicate content as far as google is concerned.
That aside though, modules don't have nid's thus no way to point to the forums without pointing to the path, unless you tried rewriting the path to look like an nid and I don't know that I'd suggest doing that.
My mistake was that I kept
My mistake was that I kept trying "forums" instead :D. As for the primary menu I managed to add the forums and other items but like I mentioned the placement is now the problem. I had completely forgotten about being able to add it through the theme settings (they were disabled), however now that I've tried it I'm not quite sure its what I want. The links now appear horizontally which is good, however they're still text links rather than actual buttons or tabs. I'd prefer to not change the theme so any idea how I can create buttons ? You mentioned I could use css but my scripting knowledge is very limited.
=-=
what you see aren't buttons, they are primary links styled to look like tabs with css.
I, personally, can't help without seeing the site as I have no idea what theme you are using. What you can do, browse contrib themes, find a theme that already has the tabs styled in a way you want, and pull the necessary css to put in your style sheet.
The theme I'm using is
The theme I'm using is Tapestry , I'll try your recommendation and see if I can insert such tabs, I've experimented with the Quick Tabs module but it doesn't seem to be quite what I want so I'll experiment with the rest of the Tab modules.
=-=
quick tabs won't do what you want as it's not intended for primary links. The only way to do it is through styling them with CSS.