Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
My goal is to have the node's term menu expanded on the node page
I installed on my drupal website (7.12) :
- taxonomy menu module (7x 1.2)
- taxonomy menu trails (7x 2.0)
In structure > taxonomy > modify > Taxonomy menu, I cannot see anything that could configure correctly the "taxonomy menu trails". I dont get anything to configure or set the active trails.
Is there something I m missing? How should I configure my menu to get the node's term expanded on my node's page ?
thank you
Comments
Comment #1
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedHi,
You need to edit content type (structure -> content types -> edit -> vertical tab "Taxonomy Menu Trails") and select correct term reference fields to set active trail and expand menu.
Comment #2
filnug CreditAttribution: filnug commentedthanks @Dmitriy.trt for your quick help!
Comment #3
filnug CreditAttribution: filnug commentedHi,
I m sorry bu I have to re-open this issue.
I was thinking it was fixed but it dont.
Maybe this issue have something to do with the last on I wrote : http://drupal.org/node/1478862
In the moment, the menu is not expanded on the node's page.
Am I missing something in the configuration ?
I tried to enable some check (content type > mycontenttype > edit > taxonomy menu trails > Only if node doesn't have enabled menu item etc ) box but it didnt worked out.
Comment #4
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedIt is the same issue. Links and menu items will have "active-trail" class when menu is expanded by active trail. Let's discuss it here, I'll close the second task.
Please answer following questions about your configuration:
Comment #6
filnug CreditAttribution: filnug commentedHi,
Thank you for your answer.
1. What is the real path of your menu items? You can check it on the menu item edit form. Is it taxonomy/term/[tid] (where [tid] is a number)?
All my path are setup with pathauto :
- The secondary links (submenu) use [term:vocabulary]/[term:name]. Links point on a filtered list on nodes. when seleted the menu is correctly expanded
- The primary link goes to "content". That link point also on a complete list of nodes. when seleted the menu is correctly expanded
- When a final node is selected from the list of node (path: content/[node:title], the menu is no more expanded
2. How many taxonomy reference fields exist on your node type? Did you tried to enable all of them for Taxonomy Menu Trails on node type form?
- My website use 2 vocabulary terms. But the node type can have multiple term's name from one vocabulary.
- I only enabled one vocabulary on the node type (in structure -> content types -> edit -> vertical tab "Taxonomy Menu Trails"). I tried to enable all of them but it didnt work out.
3. Do you have multiple terms assigned to the test node? Maybe wrong term is selected by Taxonomy Menu Trails.
As I said every node can have multiple terms from one vocabulary
4. Which selection method did you set on node edit form? The best for testing is "Deepest in menu", please try it.
I already tried it.
Just to explain it again, my menu is made like that :
- primary menu (path : "content"), when seleted the menu is correctly expanded
-- secondary menu (path : [term:vocabulary]/[term:name]), when seleted the menu is correctly expanded
the primary and secondary menu point on a list of node. If I select one of them, then the menu is no more expanded on the final node's page.
the final node's page use the path "content/[node:title]"
Hope I m enough clear!
Comment #7
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedThanks for such a detailed answer!
Pathauto generates path aliases, they are not real paths. Taxonomy Menu Trails operates on real paths and Pathauto has no influence on it. Please, go to:
Structure -> Menus -> (on the menu you want to expand) List links -> (on the term's menu item) Edit
And post here the content of "Path" field.
Comment #8
filnug CreditAttribution: filnug commentedThanks again for your answer. It is always nice to get support!
Well, on my term's item, the structure of my path is the following :
myurl.com/name-of-the-vocabulary/name-of-the-term
so which means : myurl / [term:vocabulary] / [term:name]
is that helpful ?
Comment #9
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedYes, and that's the reason why Taxonomy Menu Trails don't work for your website. For now it supports only default taxonomy term path taxonomy/term/[tid]. Are you using Views to display those pages on path [term:vocabulary]/[term:name] ?
Comment #10
filnug CreditAttribution: filnug commentedYes In fact, I m using views to display to page.
I also use "display suite" to display le final node's page.
Comment #11
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedConverting issue to feature request. We need some way of setting custom term path pattern. This feature should be quite easy to implement. I'll try to do it on this weekend, but I can't make any promises about the finish date.
Comment #12
filnug CreditAttribution: filnug commentedokay nice!
I stay eyes open!
If you can drop a line on this post, it would be awesome.
Thank you again for your help!
Comment #13
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedFix committed. Dev version will be packaged in the next 12 hours.
To use patterns you have to edit node type and set "Term path" to "Custom patterns" in "Taxonomy Menu Trails" vertical tab, then enter term path patterns into appeared text area.
Comment #15
filnug CreditAttribution: filnug commentedokay... I m pretty busy right now, but I will for sure have a look on the new version soon!
Comment #16
filnug CreditAttribution: filnug commentedHi !
I have installed the last version of the module and tested it.
Well, it doesnt work, so I certainly miss something.
This is the situation :
On a node page, I have a menu. Actually, the menu is closed. What I need is that when I m on the node's page of the menu is expanded with terms vocabulary.
So I have a node page with the url : fruits/[node_title]
And I need to get the menu expanded with terms vocabulary : [term:vocabulary]/[term:name]... for exemple : fruits_terms/[term:name]
In the content type, I have set up the "taxonomy menu trail tab" like this :
- Term references for setting active trail : my fruits terms
- Term path : custom patterns
- Term path patterns : [term:vocabulary]/[term:name]
I m sure I dont understand something right to set up it correctly !
Comment #17
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedThe only placeholder you can use for these simple path patterns is
[tid]
. To use full tokens in this field we'd have to load all terms attached to current node on each node page. After your message I'm thinking about adding token-powered patterns in addition to simple ones.Just to be sure. Do you really need
[term:vocabulary]/[term:name]
pattern? Or maybe it's just a path alias and the real path is something likemy-custom-view/[tid]
?Comment #18
filnug CreditAttribution: filnug commentedWell... it is awesome, cause it work pretty well :-)
I did a mistake all by myself. Here is how I set up the options of taxonomy menu trails :
- Term references for setting active trail : my vocabulary term
- Term path : ask taxonomy menu ! instead of custom patterns
and thats it !
I m sorry if I make you loosing time on it, but I thank you for your help and putting me in the correct way !
Comment #19
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedI'm glad that it works as expected :-)