Hi, I have just installed the latest version and I am happy that "Display descendants" is available again.
But how can I show only the parent menu item in the title?
Now the title shows "Parent item, child item1, child item 2, child item 3".
It would be nice if there is an option allowing to show only the parent item.
Thank you.
Comments
Comment #1
tomsm commentedComment #2
indytechcook commentedThis isn't possible with the current version. It has been requested to make it part of the "display depth" functionality in this post #388486: Basic considerations for latest version
I know it's long, but it's in there, I promise ;)
Comment #3
tomsm commentedIndeed, "display depth" would be a good idea.
Or to make it simple, just an option to turn on or off the display of subterms in the title after the parent term.
Comment #4
ksc commentedIf you select Menu Path Type:=custom path and give a name for example "category" under Base Path for Custom Path: you can make your own view.
The path of the view page must be: "category"/% and argument is term ID. When editing the argument you can give a name as title, which will be the title for all menu
timesitems.Comment #5
indytechcook commentedtomsm, I misread your question. I just skipped the work 'title' for some reason. ksc is right. The title is control by the page call back (view/taxonomy/custom) and not by taxonomy menu. You can use a view by either using ksc's method above or by enabled the default taxonomy view (see readme for more details). You can control how the title is displayed from the view settings.
Comment #6
indytechcook commentedAlso try turning off the "display descendants" option. This will change the title but also the content of the page.
Comment #7
tomsm commentedSorry, but I do not understand how do this.
What means: "You need to have a view with path 'custom path/%' and an argument 'Term ID' before you create this taxonomy menu."
and: To use depth the path in the view has to have the path of '/%/%' The two arguments must be 'Term ID (with depth)' and 'Depth Modifier'. Have this view setup before you create this taxonomy menu. Otherwise leave this field empty!
Has "view" something to do with the views module? Do I need to use the views module to solve this problem?
Sorry for my "stupid" questions, but I have never used views before.
Why should I turn off "Display descendants"? If I turn this off, the title problem is solved, but I want to show descendants.
Comment #8
indytechcook commentedIf you are using the 'default' path and do not have any views or other custom page call backs (using php code and hook_menu) then the taxonomy module controls the title of the page. Taxonomy Menu only saves the terms as menu items. This is different then the previous version where taxonomy menu was doing the page display. The change was made because it allowed for very little flexibility (without hacking the module) to change what was being displayed on the page. Now developers have can pretty much what ever they want.
At this time, there is no way to do what you want with out writing a custom module. If you create a view to handle the display of the page and set the 'path' to 'taxonomy/term/%' you can control what is in the title because there is an option to set the page title.
I know the views module can be very intimidating. I recommend the book Using Drupal. It gives a clear picture and examples. Of course there is a ton of free documentation on the web but many times they assume certain levels of views knowledge.
I do apologize and we are taking this into consideration for the next version.
Comment #9
tomsm commentedOk, I will read the book and look for tutorials abouts the views module. I still have to learn much about Drupal.
It would indeed be interesting to have a simple option that allows to turn on or off the display of descendants in the title.
Thanks for your help.