Hi,
I have been using Drupal for a little while now, and have tended to use different techniques to get the general site structure the way I want it. On a site that I am currently working on I need to define a clear site hierarchy and to use drupal generated menus to expand and contract depending upon the users location within the project. All of that seems easy until I go to set up categories.
My initial approach is to set up one major vocab with a single hierarchy that covers the entire site. Then I add terms within that vocab - top level terms to indicate major site sections (global nav) and nested terms to describe the actual structure of the site as per the site map.
However, this approach seems to fall apart in terms of how Drupal generates the menus and breadcrumbs. Drupal adds the current vocabulary name to the breadcrumb trail. This means that if I am in a category named services and I have created a vocab named, for example, site sections, my breadcrumb becomes:
home > site sections > services
rather than
home > services
So, i try to set up an individual vocab for each section of the site but this runs into its own problems, mostly revolving around the taxonomy_menu index pages.
I notice that you can set up menus in a number of ways - there are boxes in the themes settings for a php theme, there are taxonomy terms, and there are ways in which you can customise.
Would someone mind telling me how they go about setting up their site structure and menu system. I am sorry if this seems a repetitive topic, but I have searched the help and the forums and, whilst most bits are covered, I feel like I need a big overview. I would really appreciate it.
Comments
How attached to breadcrumbs are you?
This probably isn't a very helpful answer, but we ended up giving up on breadcrumbs altogether. We didn't have a very deep hierarchy, so the users weren't missing out on anything by losing them.
We still kept breadcrumbs around for our forum hierarchy though.
I've heard about breadcrumb improvements in 4.7 - I've decided to wait for the code freeze before jumping into testing it :)
At least I know its not just me!
Thanks for that. At least it has eliminated the "I am the only one on the planet who cant figure this out" option. There are 2 of us ;)
It does make me wonder about the right general approach to use when creating a site in Drupal. I realise there are different 'correct' approaches depending upon your goals, but given that there are a large number of hierarchically organised sites out there this would seem a common problem.
I for one would be quite happy to ride on the coat-tails of some Drupal genius!
I ditched breadcrumbs too
I had the same problems and came to the same conclusion.
Check this out
http://drupal.org/node/29761
gpdinoz
"If we can see further it is because we stand on the shoulders of giants"
Regards
Geoff
Thanks for that. At least it
It wasn't so much that we couldn't figure it out (we didn't really get that far) - it was more like they were somewhat inconsistent and arbitrary when you have a few different vocabularies (eg which hierarchy should it show?). We just decided that even if we could get them working a bit better, they didn't provide much value anyway (to our site at least) and we just dropped em.
In a narrower-deeper hierarchy they probably would be much more useful. Our design had 3 or 4 single level vocabularies - everything a breadcrumb could've shown the user was already clickable from the main navigation menus.
As an alternative approach: Could you use books for each section of your site? They will give you a proper hierarchical structure with breadcrumbs etc.
Additionally, you could then optionally use a vocabulary or two for tagging nodes with metadata categories, and then maybe use the taxonomy listings to provide more dynamic newsy style category listings of the book pages while still allowing your users to navigate around via the book hierarchies.
Didn't mean to imply you
Didn't mean to imply you could't do it! ;)
Of course you didn't
But if you had - there may have been some truth to it :)
I use vocabulary as the top level menu
Instead of vocabulary site sections and term services, I used services as the vocabulary. I have one vocabulary per main section. I use a module named vocabulary_node to display a page for the vocabulary entry in the menu.
petermoulding.com/web_architect
I started doing that
Yeah, I had a go at creating vocabs for each site section. But I have not tried the vocabulary_node module. I couldn't see it for 4.6.
The main problem that I had with the multi-vocab approach was that there were some top level links that may have had just one page (eg contact us). This wouldn't be able to be categorised into a vocabulary without first adding a term. I end up with a breadcrumb of:
home > contact us > contact us
Now I could only create a vocab for sections with content, but then I am using different approaches within the one project.
I am considering looking at themeing the breadcrumb to remove the vocan name or, last resort, hacking the taxonomy_menu module.
The contact page at this site http://petermoulding.com/
The contact page at this site, http://petermoulding.com/, is a page node named Contact. The menu entry is from vocabulary Contact using taxonomy_menu. Vocabulary Contact has no terms. Page Contact is associated with vocabulary Contact using vocabulary_node.
For comparison, the menu entry named Privacy is a page node entered direct in to the menu using administer > menus.
Vocabulary_node code and documentation is at http://petermoulding.com/technology/content_management_systems/drupal/mo....
petermoulding.com/web_architect
vocabulary_node replaced with a mod to taxonomy_menu
See http://drupal.org/node/39125 instead of vocabulary_node.
petermoulding.com/web_architect
petermoulding.com/web_architect
path module
Turn on path module and url alias. You can put a '/' in the alias and build out a site that the breadcrumbs work fine in.
http://beta.blkmtn.org is doen that way.
http://www.blkmtn.org/index.php?q=node/223
http://www.blkmtn.org/index.php?q=node/224
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Need a more consistent approach
Thanks for the reply sepeck. I need a really consistent approach to the breadcrumbs. In your site you have defined some major categories (i will call them your global nav) in the top banner. One of the links is to a section sca. I click to follow that link and then choose "heraldry". Breadcrumb is as expected "home > sca". But then I choose to delve deeper, clicking on "West Kingom Heralds". At this point the breadcrumb flicks over to another taxonomy, namely Sepeck (perhaps because it is given a higher weight). This results in the breadcrumb changing to "Sepeck" - not what I expect given the path that I have taken to navigate to this page. It may be relevant to your site, but for the site that I am building I need a really rigorous and consistent approach.
it's an artifact of using
it's an artifact of using blog node types. If you chose to use stories then you could avoid that with the urlalias. The goal was to catgorize content from different people's blog posts using taxonomy. Ultimatly with breadcrumbs, you have one root path no matter how much you alias and when you click on the blog post, you are reverted to a blog path.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Regarding breadcrumbs, have
Regarding breadcrumbs, have you taken a look at Jeremy's efforts? Please see his detailed tutorials on www.greenash.net.au
He also proposed and is working on a category module:
http://drupal.org/node/23730
I did search. Promise.
Thanks for the link ramdak - I honestly did search this topic before posting, but clearly not well enough! Have been reading about the category module and it sounds great.
BTW thanks to all those who took the time to reply, and to the efforts of everyone who contributes their time to the development of Drupal. Every so often you are reminded of the quality and depth of open source software and you appreciate the community that created it.
Here is another link to a tutorial
http://contaire.com/drupalsite
gpdinoz
"If we can see further it is because we stand on the shoulders of giants"
Regards
Geoff