Hi Neil,
after a a lot of thinking and dreaming this "issue" is going to be a long one

A) Limitations with current versions of Taxonomy Menu

A-1: Only whole vocabularies can be choosen for a menu. One has to go to the core menu function and deactivate subterms to hide them.

A-2: If one wants to have one part of a vocabulary in one menu and another part in another menu one has to edit the menu terms with the core menu function to give it another parent item. The new location will not be shown under Taxomony/Taxonomy Menu Options. With large and hierarchical vocabulary one can easily loose the overwiew which belongs to where.

A-3: Vocabularies and taxomony terms can be used only once within Taxonomie Menu.
I´ll give an example - the given vocabulary is:

HUMANS
Body
- Organs&System
- - Nervous System & Brain
- - Digestive System
- - Respiratory System
- - - Lungs*
- - - Alveoles
- - - Bronchials*
- - - Nose
- - - …..
- - Urinary System
- - - Bladder*
- - - Kindeys*
- - - Urether*
Psyche
- Thoughts
- - Visual*
- - Auditive*
- Emotions
- - positive*
- - negative*
- - neither/nor*

Let´s say the user now wants to have all under Navigation menu and! the subtree part “Psyche” in an extra menu that will be shown in it´s own block for certain circumstances. That doesn´t work with the current versions.

A-4: As drupals core menu function doesn´t show which other module has created a menu item (only the missing delete bottum tells us, that it comes from elsewehere) the menu system can get very confusing when moving and hiding menu items there.

B) Here is my suggestion

Modul „Taxomony Menu“ goes under path „Navigation/content management/” or /site building/ (no taxonomy menu functions elsewhere)

->OPENING MODULE

Three menu tabs:

List all Menus | Create new menu | Settings | Open box of pandorra

With existing menus a table shows up:

“Menu name1” - edit menu - activate menu – deactivate menu – rebuilt – delete
+ Vocabulary: “Vocab_name/Vocab_term” – edit - delete
+ Vocabulary: “Vocab_name/Vocab_term” – edit - delete
+ add Vocabulary

“Menu name2” - edit menu - activate menu – deactivate menu – rebuilt menu – delete menu
+ Vocabulary: “Vocab_name/Vocab_term” – edit - delete
+ add Vocabulary

“Menu name3” - edit menu - activate menu – deactivate menu – rebuilt menu – delete menu
+ Vocabulary: “Vocab_name/Vocab_term” – edit - delete
+ add Vocabulary

Function: the order of vocabularies can be changed (maybe that a Save buttom has to be there)
(“Menu name1” stands for things like “Interests”, “Opinions”, “Categories”, “Members” …)
(Only activated menus are highlighted)
(edit – activate - delete -- a.s.o. are links to referred function)

-> With CREATING or EDITING a menu one gets the following options:

Menu: (dropdown list to select one out of all menus [core module] including menu items)

Menu name: …… (the name of this taxomomy menu p.e. Interests, Family, Sports …)
enable / disable: Item for menu name (does the menu name will be the top item of the menu.)

Menu type path: Standard / Hierarchy
Base Path for Hierarchy Path: …..

enable / disable : Syncronise changes to this menu: enable / disable
enable / disable : Display Number of Nodes
enable / disable : Display only own content for terms that have subterms ( new )
enable / disable : Hide Empty Terms
enable / disable : Auto Expand Menu Item

-> SAVE

Back to:
List all Menus | Create new menu | Settings |

“Menu name1” - edit menu - add Vocabulary - activate menu – deactivate menu – rebuilt – delete
+ add Vocabulary

(It has no vocabulary up to now. So the menu is inactive and can´t be activated.)

Next step:

-> ADD VOCABULARY
To each menu one or more vocabularies or terms / subterms of an vocabulary can added

Vocabulary: (dropdown list to select)
All vocabularies with terms and subterms are shown here. So one can choose whole vocabularies as well as trees of subterms or single terms.

enable / disable: Item for Vocabulary
(This is only relevant if a whole vocabulary is choosen. If enabled the vocabulary will be a menu item itself under the tax_menu name)

View for vocabulary: (dropdown list to select a view)

-> SAVE

Back to:
List all Menus | Create new menu | Settings |

“Menu name1” - edit menu - add Vocabulary - activate menu – deactivate menu – rebuilt – delete
+ Vocabulary: “Vocab_name/Vocab_term” <- new vocabulary
+ add Vocabulary

-> ADD VOCABULARY
Same as above
-> SAVE

Back to:
List all Menus | Create new menu | Settings |

“Menu name1” - edit menu - add Vocabulary - activate menu – deactivate menu – rebuilt – delete
+ Vocabulary: “Vocab_name/Vocab_term”
+ Vocabulary: “Vocab_name/Vocab_term” <- new vocabulary
+ add Vocabulary

-> ACTIVATE MENU
The tax menu will be shown within the choosen menu.

-> DEACTIVATE MENU
The tax menu will be not be shown.

-> REBUILD
The menu will be rebuilt and all changes that are made under admin/site building/menus will get lost.

Menu tab SETTINGS
Create menues for all vocabularies (does it makes sense?)
Others?

Ah – I forgot to explain the function OPEN BOX OF PANDORRA
-> a direct link to the download of the latest dev-version :-)

--------------------
Neil, I´m not a php programmer and I don´t know much about drupals internal secrets. So I can´t estimate how much work this would be. I try to respresent the users view. Do my suggestions make sense to you?

Thanks for reading
Klaus

Comments

indytechcook’s picture

Wow. Digesting...

indytechcook’s picture

It took me reading through the post 4 times to understand what you are saying and I'm glad I did. I like the UI you proposed. It makes real sense from a usability prospective (I'm a decent php programmer but not the best at UI ideas)

Luckily, I can still use 90% of the current module and just move it around and add some new functionality. I wanted to implement the ability to add different parts of the vocabulary tree to the different parts of the menu but I didn't know how to implement it from a front end prospective.

The only thing I'm a little worried about implementing is having a drop down list of views. I think it makes sense from an end user prospective, but the functionality already exists by using the "path" settings. If someone sets the view from the drop down and has the path set in a view, then the view module wins and ignores the setting in taxonomy menu. I'm afraid it will approach that pandora's box thing.

I love the rest of your ideas. I'll work on them.

ksc’s picture

GOOD!
With me is vice versa! I never was a real good programmer - I was partner in a software company for architecture and engineering software. But that is more than 18 years ago. My strong side was front side development and TESTING.
Now I´m into Natural Medicine - we have a praxis and I also give seminars. I´m setting up a community site for practitioners - that´s what brought me to drupal.

The only thing I'm a little worried about implementing is having a drop down list of views.

Me too. I made this suggestion to be a bit unperfect. I know that it won´t really work with your new concept of Hierarchy.

Some additional thoughts:

I) Could the vocabularies for each taxomomy menu be moveable up/down and! left/right like the ones in the core menu module? I´m not sure if this would make sense.

II) If a tax_menu gets changed by the core menu module - could your module be aware of that change and show at least a red warning sign? So people know that it is no longer in original condition.

III) What happens if a user moves terms within a vocab? I´ll test how your current version reacts on this.

One has to take into account that moving terms from one vocabulary to another will be possible in future. It is not yet possible - at least not with the modules I have installed (taxonomy manager) but I saw various feature request in this direction.

The problem is that people start Drupal sites without understanding the whole meaning and use of taxonomy. After a while they notice that their tax-terms and vocabularies are not well organized but can´t be changed easily because they have already a lot of content linked to the terms.

IV) Terms
a) The term "Vocabulary" is fix and defines a whole thread or bunch of taxonomy terms.
Is it correct to use the word also for a part of a vocabulary? Better to say "vocabulary and taxonomy terms"?
b) The term "Menu" is defined by the core menu module. What will be defined in my suggestion are menu-items - to call it menu could be confusing esp.for new drupal users. What term do you think could be used instead of? In German we have "Menü" for the whole and "Menüpunkt" ("Punkt" means point) or "Menüeintrag" for a single menu item.
In English there are the words "menu selection", "menu bar", "menu item" which don´t bring us further.
Instead of menu one could say "top-item for menu" "name for top-item: ....."

V) Before rebuilding a tax-menu the module could create a duplicate of the excisting one with the name "copy of ...." So in case the rebuilt is not what they want they could delete it and rename the copy version and activate it again.

VI) How Drupal reacts on double menu entries? I think it shows only one. For example: a view creates a menu "sport activities". If there is a taxonomy top-item with the same name within the same menu-structure only one will be shown. How to deal with that?
When activated, the module could check if the top-item-name is already used by other modules and give a warning (cancel/go ahead).

VII) Together with cck taxonomy field the new module would be perfect to create nice menu structures for all kind of node types - with perfect bread crumbs.

That´s so far.

My step son asked me to practice some mathematics with him: integral calculus.

Klaus

ksc’s picture

One more thing comes into my mind:
A better UI version for the function:
-> ADD / EDIT VOCABULARY

Vocabulary: ....
(dropdown list to select. Only Vocabulary names will be shown - not the terms within! Otherwise this select list could be very very long)

Parent item: ....
(The choosen vocabulary with all terms. User can choose the vocabulary as whole or just parts of it)
(Have a look at CCk content taxonomy field: add a taxonomy term to a content type and look what the options are and which select lists it present there - maybe that you could take a part of code into your module)

Depth of taxonomy tree: ........
By setting a numeric value, the depth of the hierarchy shown can be limited. Leave this field blank to show the whole hierarchy.

enable / disable: Create menu item for parent item

indytechcook’s picture

I'm adding you to a favorite list next time I need ideas for a new module ;)

I. I thought about that. I'm not sure it would fit it with the rest of the design though. The structure of the terms should drive how the menu appears.

II. That's a complicated one. Not sure exactly sure how to implement that. I would have to think about it.

III. I hook into the taxonomy changes so any changes to the vocab structure update the menu structure.

IV. good idea. I'll do my best to standardize. I like menu and menu item, vocabulary and term.

V. Interesting. The rebuild currently just deletes all of the current menu items and rebuilds the menu items based upon the tax menu settings and taxonomy structure. It's also used when you make a major setting change (change menu, path). Are you suggesting that a setting changes should not be applied until a rebuild is done? How do you see the rebuild working? This is a major rework. Something for future development.

VI. The menu system allows duplicates. I've done this on accident with bugs in tax menu :)

VII. I like the word "perfect."

ksc’s picture

I was outside for a run - cleanse the head.

I'm adding you to a favorite list next time I need ideas for a new module ;)

There is already some major module in my mind - but I don´t tell you, otherwise you might not complete this one.

-> IV. Terms
I think that the word "menu" should only be used for the menus created by core menu module. Taxonomy menu creates "menu items" within menus.
I suggest:
"Menu item group" That is one bunch of vocabularies and/or terms charactered by a name, that can be the "top menu item" (optionally)
"Parent item" or "parent items" for the top items within a "menu item group".

-> V. Rebuild
With fresh air in my head I think a rebuild function will not be neccessary.

We have the following opposites:

build (create) - remove
enable - disable
add/edit - delete

Initially a "menu item group" is stored only locally within the module.

build or create: writes the structure into Drupals menu system, simultaneously it should get enabled.

disable: the menu structure stays as it is but its flag gets disabled (same as core menu function)
enabled: changes flag to enabled
(Warning: with this function your settings in core menu module will be overwritten)

remove: removes the "menu item group" with all subitems from the menu system, but still exists within the tax_menu.
(Warning: with this function your settings in core menu module will be overwritten)

delete: delete the "menu item group" completely.

(so rebuild = first remove then build again)

-> VI. I have done this too and strange things happened.
I´ll try it again.

indytechcook’s picture

I started to work on this last night and it's a little deeper than I first thought. I can still use most of my current code, there is just more I have to add to get the 'menu group' concept to work.

No problem though. I love a challenge.

To keep a clean version schema, I'm going to start a new branch 6.x-3 with these new features. Please are already starting to use the 6.x-2 version.

ksc’s picture

OK!

indytechcook’s picture

I began to code this yesterday. Lots of new and exciting stuff. I'll keep you posted.

ksc’s picture

Hi Neil, some short ideas to 6.x-3.0.

Functions:

GA: Add menu group
GE: Edit menu group
GD: Delete menu group (=+Remove group from menu)

VA: Add vocabulary
VE: Edit vocabulary
VD: Delete vocabulary

GWM: Write (or publish?) group to menu
GUM: Update changes to menu
GRM: Remove group from menu

(The last three functions could have three conditions:
highlighted (bold) = that should be the next step
normal (black) = is possible
inaktive (grey) = is not allowed)

Prompts:
PNW: "Group not written yet to menu"
PHA: "Group has to be actualized"
PWM: "Group has been written to menu"

Flags:
(I´m sure there are shorter words/phrases)

FVE: Vocabulary exists: true/false (number of vocabularies within group>=1)
(if false
"Write group to menu" not allowed
"Remove group from menu" not allowed
AND Prompt "Group not written yet")

FVC: Vocabulary changed: t/f
(If true: only changes have to be written to menu? or all?
AND Prompt "Group has to be actualized."
AND Highlight function : "Update changes to menu")

FOC: Options/parameters changed: t/f
(If true:
Prompt "Group has to be actualized."
AND Highlight function : "Update changes to menu")

FGM: Group has been written to menu: t/f
(if true
Prompt: "Group has been written to menu"
inactice function: Write group to menu)

(if false
inactive Function "Remove group from menu")

---------------
I could complete this truth or condition table if its helpful to you.

Klaus

ksc’s picture

About strictly hierarchical vocabularies:

Please read my comment on http://drupal.org/node/399380
(And support it, if it makes sense to you)

Thanks, Klaus

ksc’s picture

Hi Neil, very quite here at the moment.
Some more ideas for next version.

/Preamble:
We can differentiate the follwoing types of vocabularies.

UNSORTED (like interests, free tagging)
Most probably nothing to create a menu out of.

MIND-MAP TYPE (every term can have nodes linked to it)
Can be used for t-m (taxonomy menu or transcendental meditation)

STRICTLY HIERARCHICAL (only bottom terms can have nodes linked to it)
Unfortunately drupal has no module up to now, that allows users to select only bottom terms.
Ideal to use with t-m.

MIXED (one branch is umsorted or mind-map type another strictly hierarchical)

/Some examples
The following two vocabularies are given:

VOCABULARY 1
- TERM1
-- Term 1.1
-- Term 1.2
--- tErm 1.2.1
---- teRm 1.2.1.1
---- teRm 1.2.1.2
--- tErm 1.2.2
-- Term 1.3
- TERM 2
-- Term 2.1
-- Term 2.2
--- tErm 1.1.2
- TERM 3

Vocabulary 2
- Attribute 1
- Attribute 2
- Attribute 3

/Some examples for “menu item groups” that users might want to create:

Example A)
- TERM1
-- Term 1.1
-- Term 1.2
--- tErm 1.2.1
---- teRm 1.2.1.1
---- teRm 1.2.1.2
--- tErm 1.2.2
-- Term 1.3
That´s - I guess - the easiest part.

Example B)
- TERM1
-- Term 1.1
-- Term 1.2
--- tErm 1.2.1
--- tErm 1.2.2
-- Term 1.3

Like A) but lowest level should not be shown.
So we need the option to cut off the bottom ---- teRm 1.2.1.1 and ---- teRm 1.2.1.2 are not included.
My idea about “Display Depth in Custom Path:” basically was, that it limits the depth of the branch that is selected.

C) User wants to have:
VOCABULARY 1
- TERM1
-- Term 1.1
-- Term 1.2
--- tErm 1.2.1
---- teRm 1.2.1.1
---- teRm 1.2.1.2
--- tErm 1.2.2
-- Term 1.3
- TERM 3

So the branch TERM2 is missing.
Depending on the way to select Terms and branches (dropdown lists or checkboxes) one or two “vocabularies” within a “menu item group” are needed.

1) Select type “checkboxes”:
The whole vocabulary would need to be represented by a tree and checkboxes. Every Term or branch needed could be checked (this kind of selection content taxonomy module has as option).
Examples A), B), C) are easy to create (from users side). But what is with large vocabularies?
An option within this type of selection could be a function to show or hide a branch by clicking on the term.

2) Select type “drop down list with multiple select”:
More than one branch could be chosen with STRG+Click. Can be confusing and unmanageable for large vocabularies.
Examples A), C) are possible, for B) a function is needed, to hide the two bottom terms.

3) Select type “drop down list with single select”:
Only one branch could be selected.
Example A) is easy to select, for B) a function is needed, to hide the two bottom terms.
To create C) two “vocabularies” within a “menu item group” are needed.

Let´s look at other examples:

D)
- TERM1
-- Term 1.1
-- Term 1.2
--- tErm 1.2.1
---- Attribute 1
---- Attribute 2
---- Attribute 3
--- tErm 1.2.2

So we have a mixture of two vocabularies!
Actually a thing I would need to have for my site.

Whatever select type is programmed, more than one “vocabulary” within “menu item group” is needed – I guess three are needed
---------------------
- TERM1
-- Term 1.1
-- Term 1.2
--- tErm 1.2.1
--------------------
---- Attribute 1
---- Attribute 2
---- Attribute 3
--------------------
--- tErm 1.2.2

Question is: how to tell ---- Attribute 1 to be child of --- tErm 1.2.1 ?

E)
- TERM1
-- Term 1.1
-- Term 1.2
--- tErm 1.2.1
---- Attribute 1
---- Attribute 2
---- Attribute 3
--- tErm 1.2.2
---- Attribute 1
---- Attribute 2
---- Attribute 3

Uups. I need some time to understand what that means ……
That means a kind of filter is needed.
--- tErm 1.2.1
---- Attribute 1
Only nodes will be shown that are linked to both taxonomy terms, or to make things worse who are members or children of --- tErm 1.2.1 and members of ---- Attribute 1.

F) There are even worse examples possible.

----------------
Now I´m confused. Again this box of ….

….. Mom, do you allow me to put on a bikini this summer? ……No, Charles.

indytechcook’s picture

I've been a little quite, working on a paying project so I can continue to work on this one :) No new issues is also good. I'm going to release v3 as stable and recommended. So exciting.

I'm working on a mock up for UI (not my strength so I'm learning).

You can do cross vocabulary linking by using term relation. Normally relations are non-hierarchically. You can also link by the name of the term, Like using primary and secondary terms. If you have menu item in secondary that matches primary, then it's linked (or something like that). It makes sense to implement a parent/child vocabulary.

ksc’s picture

You can do cross vocabulary linking by using term relation. Normally relations are non-hierarchically. You can also link by the name of the term, Like using primary and secondary terms. If you have menu item in secondary that matches primary, then it's linked (or something like that).

I´m not quite sure if I understand what you are saying.

Let´s say we have

Size (Vocabulary)
- large
- small

Clothes (Vocabulary)
- Shirts
- Pullovers

and the menu is:
Clothes
- Shirts (term id=13)
- - large (term id = 48)
- - small
- Pullovers
- - large
- - small

In my example, we work with custom path.

If large is klicked the url path is: "category"/48
So how does view knows to show only large shirts and not larges pullovers?
I think this could only be done by "category"/13/48 - or is there another way?
How this is solved in the patch of http://drupal.org/node/269773 ?

ksc’s picture

One more for today:

My suggestion for UI. Some changes to first suggestions in this node
-------------------------------------------------------------------

| List menu group | Add menu group | Settings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --
| "menu group name" - display - edit - delete -
|
| - build menu link - update menu link - remove menu link -
|
| status: published /unpublished/needs to be updated
|
| requires view: path="category/%" argument: Term ID
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|"vocabulary name" - edit - delete -
|
| "vocabulary name" - edit - delete -
|
|- add vocabulary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions:
- display: shows the whole menu as check for users before they build the menu links.
- other functions and prompts are clear - or not?

---------------------------------------------------------------------------------

Let´s discuss the following example:

Given are two vocabularies

Clothes&Accessories (vocabulary)
- Clothes
- - Men
- - - T-Shirts
- - - Trowsers
- - - Pullovers
- - Women
- - - T-Shirts
- - - Trowsers
- - - Pullovers
- - Children
- - - T-Shirts
- Accessories
- - Bags
- - Various

Properties (vocabulary)
- size
- - woman
- - - xs
- - - s
- - - m
- - men
- - - m
- - - l
- - - xl
- color
- - blue
- - green
- - white
- style
- - sleeves
- - - Long sleeves
- - - Short sleeves

The menu should look like this:

Latest Fashion T-Shirts
- T-Shirts Men
- - Long sleeves
- - - blue
- - - green
- - - white
- - Short sleeves
- - - blue
- - - green
- - - white
- T-Shirts Women
- - blue
- - green
- - white

---------------------------------------------------------------------------------
Which steps are needed to build the menu group?

1) Add "menu group"
edit options ....... as described on top of this node.
In our example: menu group name is "Latest Fashion T-Shirts"

2) Add vocabulary
a) Select list with all vovabularies - single select!
"Clothes&Accessories" is selected

b) Selected vocabulary is shown as tree with checkboxes (sth like this excist in the content taxonomy module -> tree)
Parent terms are expanded. Klick on term hides or expands child level.
Check term will also enable all children / uncheck disables all children
In our example T-Shirts under Men and T-Shirts under woman were checked.
-> so we will have two terms with the same name (this needs to be changed later)

c) Were to put the terms?
Multiple select list with shows menu group name an all terms that are already chosen.
In our example the list has one entry: "Latest Fashion T-Shirts" (the name of the menu group)
Select the entry.

d) Save

--------------------------------------
Display menu group will show:

Latest Fashion T-Shirts
- T-Shirts
- T-Shirts
-------------------------------------

3) Add a second vocabulary

a) Select list with all vovabularies - single select!
"Properties" is selected

b) Tree with checkboxes
- - - Long sleeves
- - - Short sleeves
need to be selected in our case.

c) Were to put the terms?
Multiple select list
selection: - T-Shirts (the first one)

d) Save

--------------------------------------
Display menu group will show:

Latest Fashion T-Shirts
- T-Shirts
- - Long sleeves
- - Short sleeves
- T-Shirts
-------------------------------------

4) Add a third "vocabulary"

a) Select list with all vovabularies - single select!
"Properties" is selected

b) Tree with checkboxes
- - blue
- - green
- - white
need to be selected in our case.

c) Were to put the terms?
Multiple select list:
- - Long sleeves
- - Short sleeves
- T-Shirts (the second one)

d) Save

--------------------------------------
Display menu group will show:

Latest Fashion T-Shirts
- T-Shirts
- - Long sleeves
- - - blue
- - - green
- - - white
- - Short sleeves
- - - blue
- - - green
- - - white
- T-Shirts
- - blue
- - green
- - white
-------------------------------------

(To change name T-Shirts to "T-Shirts Men" can be done with core menu function.)

Neil, does it makes sense to you?

I´ll be very busy until next monday.

indytechcook’s picture

I see where you are going now Klaus. My original idea of linking was more on the taxonomy side rather then taxonomy menu. You can relate terms together in the main taxonomy module. If the term isrelated, then the term that is explicitly included in the menu would be the parent, and the related terms would be the children.

All of this is done in the taxonomy module (not taxonomy menu)

Clothes&Accessories (vocabulary)
- Clothes
- - Men
- - - T-Shirts (Related to sleeves below)
- - - Trowsers
- - - Pullovers
- - Women
- - - T-Shirts (Related to color below)
- - - Trowsers
- - - Pullovers
- - Children
- - - T-Shirts
- Accessories
- - Bags
- - Various

Properties (vocabulary)
- size
- - woman
- - - xs
- - - s
- - - m
- - men
- - - m
- - - l
- - - xl
- color
- - blue
- - green
- - white
- style
- - sleeves
- - - Long sleeves (Related to color)
- - - Short sleeves (Related to color)

Settings in Taxonomy Menu:

The menu group concept still applies.
Group name: Latest Fashion T-Shirts
1st menu item: Clothes&Accessories -> Clothes -> Men -> T Shirts
2nd menu item: Clothes&Accessories -> Clothes -> Women -> T Shirts

When the menu is create it pulls in the related terms and creates the following menu:
Latest Fashion T-Shirts

Latest Fashion T-Shirts
- T-Shirts
- - Long sleeves
- - - blue
- - - green
- - - white
- - Short sleeves
- - - blue
- - - green
- - - white
- T-Shirts
- - blue
- - green
- - white

So the option is whether to have the configuration in the taxonomy or the taxonomy menu. Either way, a preview is a great idea so they know what they are getting before it's saved.

(To change name T-Shirts to "T-Shirts Men" can be done with core menu function.)

Do we allow for this type of customization in taxonomy menu? I think we need to be careful and not take over all of the control. Taxonomy menu is a compliment to taxonomy and menu. I really want to keep this simple for people who need it simple but give flexibility for the situation mentioned above (the ultimate programmers struggle).

You also bring up the idea of how to display the menu.

If large is klicked the url path is: "category"/48
So how does view knows to show only large shirts and not larges pullovers?
I think this could only be done by "category"/13/48 - or is there another way?

I plan on the URL to still be control by hook_taxonomy_menu_path. So the default path would be "taxonomy/term/48 13." For custom, it would be "category/13 48" This save all of the hard work we did with compatibility with views.

I hope to have a mock up UI done by this weekend. I learned a ton this weekend about using JQuery to improve the UI experience.

ksc’s picture

Do we allow for this type of customization in taxonomy menu? I think we need to be careful and not take over all of the control. Taxonomy menu is a compliment to taxonomy and menu. I really want to keep this simple for people who need it simple but give flexibility for the situation mentioned above (the ultimate programmers struggle).

I´m with you. It is a walk on the edge to decide between usability and functionality. In my experience it is the UI that makes the difference! Easy guidelines for simple use and options for sophisticated functions.

So the option is whether to have the configuration in the taxonomy or the taxonomy menu.

I didn´t thought about this option - so we complement each other well. Your way will makes things easier for you. I can´t see at the moment, which possibilities and limitations this has. I need to play around a bit with relationships in vocabularies. Up to now I never used this option.

When the menu is create it pulls in the related terms and creates the following menu:

What if there are more than one relationship and not all should be shown within that menu?
Will you show users the excisting relationships and let them chose?
( By the side: is there a module that shows the term relationships in a nice way?)

So the default path would be "taxonomy/term/48 13." For custom, it would be "category/13 48" This save all of the hard work we did with compatibility with views.

If this works, great. (I thought that "category/13 48" means: show every content linked to 13 and show every content linked to 48. But you say it is show every content linked to (13 AND 48) - than it is fine.)

Either way, a preview is a great idea so they know what they are getting before it's saved.

Yes, "preview" is the right word, not display.

:-) Klaus

indytechcook’s picture

What if there are more than one relationship and not all should be shown within that menu?
Will you show users the excisting relationships and let them chose?
( By the side: is there a module that shows the term relationships in a nice way?)

You may have just found the reason why we can't use term relations. It would have to look at all of the children of the term you select for the group item. Then it could display all of the terms that have relations, then a drop down of which related term to use or to not use any of them. I'm started to like this idea.

Taxonomy Manager is a good tool http://drupal.org/project/taxonomy_manager

ksc’s picture

Which other modules work with or uses term relationships? That might decide if it is a good way to go for this module. I think it is important not to interfere with excisting needs or concepts.

And using term relationships would require "Taxonomy Vocabulary Relate"
"This module allows you to select related terms in taxonomy from another vocabulary. The default taxonomy module only allows you to select related terms from the same vocabulary."
see: http://drupal.org/project/taxonomy_vocab_relate
I tested tax_manager - it can´t do that. You´re right, it shows relationships nicely.

:-) Klaus

indytechcook’s picture

The default taxonomy module only allows you to select related terms from the same vocabulary.

Good catch. I forgot about that. I guess your way is the best way. Just means more work for me. :)

ksc’s picture

Yes, I guess it is a real challenge to program that.
Especially to take care of changes within the taxonomy that affect excisting menu groups.

ksc’s picture

An addition to my comments
#14

Clothes
- Shirts (term id=13)
- - large (term id = 48)
- - small
- Pullovers
- - large (term id = 48)
- - small
So how does view knows to show only large shirts and not larges pullovers?
I think this could only be done by "category"/13/48 - or is there another way?

and
#17

If this works, great. (I thought that "category/13 48" means: show every content linked to 13 and show every content linked to 48. But you say it is show every content linked to (13 AND 48) - than it is fine.)

I tested with VIEWS. "category/13 48" is an or-function which shows both. In our example it would show all 13 and all 48. To filter the nodes that are linked to both terms the path has to be category/13/48 and the view needs to have two arguments $tid $tid.

This is only important if the child term (here its is large=48) is an attribute to the term (13) and is also linked to other terms too - which is true for the given example (-> Pullovers).

So how this problem has been solved in the patch of http://drupal.org/node/269773 for Drupal 5?
I don´t have a Drupal 5 installation to check this.

indytechcook’s picture

Well, the path also is reliant on the "display descendants" option. That's what turns it into an OR. AND's are 13+48.

Looks like we need another option :)

ksc’s picture

Well, the path also is reliant on the "display descendants" option. That's what turns it into an OR. AND's are 13+48.

I think the "multiple arguments option" provides only the OR function (OR in the sense of binary logic) independent of " " or "+" as separators. I can´t produce any AND relationships in VIEWS by passing arguments without using two seperate arguments tid/tid.

However, as you said, it looks like we need another option. The moment the user connects a second "vocabulary" to an excisting one, he/she needs to decide weather it is a ´normal´ relationship to parent terms or if it is an attribute or property relationship to the terms they get linked to.

Normal relationship: path=category/% argument: TERM ID
One attribute/property level: path=category/%/% argument: TERM ID TERM ID
Two attribute/property levels: path=category/%/%/% argument: TERM ID TERM ID TERM ID
(Maybe that path=category/% will also work with argument: TERM ID TERM ID)

You could limit this function to just one or two levels: the other cases should be sorted out with filters within VIEWS.

One more thing:
In my comment #15 I called the branches that can be added to a "menu group" "vocabularies".
That term can be misleading. Because two branches there could come from the same taxonomy vocabulary.
So would "branch" be a better word?

:-)

MCNet-1’s picture

Many vocabularies for one menu is excellent idea!

MCNet-1’s picture

maybe integrate with hierarchical select module?

indytechcook’s picture

What sort of integration? They don't have a stable version fro D6 either.

giorgio79’s picture

Would be great convenience for the user to show the number of nodes for a given term in the taxonomy, and subsequently in the menu , perhaps with integration with this module? :)

http://drupal.org/project/term_node_count

indytechcook’s picture

@giorgio79 This already exists. Just select "Display Number of Nodes" Or are you looking for something different?

giorgio79’s picture

Thanks Indy, yes, I just installed the module and I see it indeed exists.

I was just wondering, that we could use that module as it nicely caches the counts for nodes per term, and I was not sure if taxonomy menu caches the counts as well. :)

indytechcook’s picture

It doesn't I looked at it. It's a possibility not really a bad idea either. I would just have to edit the one function that counts the nodes.

indytechcook’s picture

I'm not really sure if you would gain any since there is only one line of code in taxonomy menu pulling the node count. I don't use the taxonomy functions like that module implies. I will look a little deeper into it before making a decision.

function _taxonomy_menu_term_count($tid) {
  return db_result(db_query('SELECT COUNT(n.nid) AS c FROM {term_node} t INNER JOIN {node} n ON t.vid = n.vid WHERE n.status = 1 AND t.tid = %d', $tid));
}
giorgio79’s picture

Thanks Indy.

Meanwhile I found another feature that may be useful :)

If I could specify the menu item weight for the taxonomy menu so I can control the order it shows.

For example, I would like to place my taxononomy menu item in the primary links, but in the beginning not at the end. At the moment it goes to the end automatically , because I believe somehow it is set to be the heaviest.

indytechcook’s picture

Yeah, that's a good idea. You can do that now manually by moving the menu down after you create it. As long as you don't "rebuild" the menu then is should keep it's place with new updates.

giorgio79’s picture

Thanks Indy, I just found it and indeed I can set it there :) So it is good as it is :)

ksc’s picture

Hi Neil, how is it going with the 6.x-3 Version?
It seems you have been busy with making the current version compatible with other modules like i118, domain access etc. I couldn´t help testing because I don´t use these.

I suggest to start the 6.x-3 Version with the option that just one vocabulary (or parts of it) can be added to a menu group - more options can come later.
I would also suggest that a desciption about how to use the module will be available within the module, like:

| List menu groups | Add menu group | Settings | HELP <-

This might reduce the number of issues and comments here.

:-) Klaus

indytechcook’s picture

good to hear from you klaus. I've been busy with other projects also. My taxonomy menu time has been spent on answering questions on the forum. There has been a sudden spike in the number of issues logged (means more people are using it).

Build in help.... nice idea. The menu groups will be a great addition. I just finished the project that was taking most of my time. I plan on getting back to working on taxonomy menu again.

ksc’s picture

My taxonomy menu time has been spent on answering questions on the forum.

I kept an eye on the comments here - many where written because people don´t read the Readme file or don´t understand what it says. Which supports the HELP idea.
So I´m waiting for the 6.x-3 dev - I´m still with the project.
Klaus

leenwebb’s picture

Just chiming in to say I'm also really interested in the 6.x-3 version! Honestly I only scanned all of the (copious!) noted above but what I am most interested is section A from the original post: I have a single taxonomy vocabulary ("Catalog", for an Ubercart installation) and I'd love to be able to create a bunch of separate menus -- just the shirts, for example, or just the pants -- for sub-sections of that vocab.

Thanks!

indytechcook’s picture

I have a view's integration idea.

Changes to the custom path type.
Give the ability to build the path.

Initial:
Option for base. - Add Argument

Add Argument
Select box (tid, vid, tid with depth, custom, etc)
if custom then a text box

Another idea is to use tokens for the path. This is an idea that Mark had a while ago that I really liked but didn't know how to implement at the time and I wanted to get it up. I thought giving access to hooks would eliminate the need for using a token based path. Now I realize that the path needs to be more usable by non programmers.

Thoughts?

ksc’s picture

Initial:
Option for base. - Add Argument

Add Argument
Select box (tid, vid, tid with depth, custom, etc)
if custom then a text box

I like the idea. Hopefully users can handle that - as I wrote under http://drupal.org/node/428004 it is a logical AND function.
It needs to have a very good explanation.

Another idea is to use tokens for the path.

Do you have an example for a realistic situation, where this could be helpful?

ksc’s picture

Another idea:
The next version could implement also
- to create whole blocks,
- to write directories into nodes,
- or provide a cck field with which users can select a menu group which then appears within the node.
Than the module would be a "Eierlegende Wollmilchsau = a oviparous pig with wool that gives milk" which I think means "jack of all trades device" ;-)

indytechcook’s picture

I get the point. I have started working on the menu groups. Since I only have an hour or two a night (at most) it's slow moving.

ksc’s picture

I´m sorry that I can´t help with programming.
What I can do is going through all comments here and put together what we have so far.
For that I´ll open a new issue - this one is going to get unclear.

ksc’s picture

This issue continues with http://drupal.org/node/432048
KSC

yomofu’s picture

Issue tags: +secondary vocabulary

Hello there.
Before I trouble you with my problem+idea, let me first say thanks for all the work thats been done on this module.
Its been very useful to me in the past, and I am much obliged to all that have contributed.

And now, on to my problem. I'm making a big ubercart site. I've got a few hundred different products so far, categorized in ~25 categories, and subcategories. Great. But what do we do when we need to organize stuff based on a secondary vocab as well?
A manufacturer might make many different kinds of products.
Merging the two vocabs into one seems silly. It means having the manufacturer term appear as multiple times in the hierarchy.

The idea that just popped into my head is that we can leave the two vocabularies seperate and have path aliases created (to a taxonomy path) that contains two arguments. ie: /taxonomy/term/tid1/tid2

And how to display the resulting set that has both primary and secondary terms would be a problem that could be sorted out in taxonomy_term_page.tpl.php ( here isa nice tutorial on how to do that ).

... but how could get taxonomy menu to create paths in the menu system that pass 2 term ids from different vocabularies? H'mm ... I have some ideas, but first let me ask: Is this kind of functionality something that is in the works?

I saw a FOr Sale sign and no new releases for the past couple of months ... who is heading this up now?

Cheers,

Arthur

indytechcook’s picture

Sorry I've been MIA. I had a baby in June and it's been crazy.

Your best bet is to use hook_taxonomy_menu_path and create your own path. http://drupal.org/node/380652

It's called for each term. It's passed the vocab id and the term id. You can pretty much do anything you want with php.

arlinsandbulte’s picture

As per #45, this issue is continued at #432048: Functions and User Interface for Version 3.0 .
So, I think to keep things tidy, this should be marked as duplicate.

There is a lot of good info and discussion here, which is summarized in #432048: Functions and User Interface for Version 3.0 .
#432048: Functions and User Interface for Version 3.0 also includes a link back to this issue for reference. So the chain is kept in tact.

arlinsandbulte’s picture

Status: Active » Closed (duplicate)