(-> Latest version)
When I enable "Hierarchy" within taxomomy (Hierarchy modul itself is installed) an empty menu shows up.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | summit.zip | 1.25 KB | indytechcook |
| #18 | summit.zip | 1.15 KB | indytechcook |
(-> Latest version)
When I enable "Hierarchy" within taxomomy (Hierarchy modul itself is installed) an empty menu shows up.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | summit.zip | 1.25 KB | indytechcook |
| #18 | summit.zip | 1.15 KB | indytechcook |
Comments
Comment #1
indytechcook commentedI saw that yesterday and thought I had fixed it. I will make sure I committed the changes.
Comment #2
ksc commentedI just installed the version of 2nd of march (latest) - so my issue was from the dev-version before.
Now let me see what is happening....
(I allways uninstall the older version)
No menu shows up at all, when "Hierarchy" is selected.
I tried "Item for vocabulary" checked and unchecked.
I tested "normal" taxonomy and cck-made taxonomy.
Klaus
Comment #3
indytechcook commentedhmm... I'll test tonight.
I was going to make this version beta1 then start working on some the changes for the next release. version 3 maybe? #388486: Basic considerations for latest version
Comment #4
summit commentedHi,
Same problem here. Only an empty menu item is added.
Subscribing.
Thanks for going into this!
Greetings, Martijn
Comment #5
indytechcook commentedOK. I wasn't able to reproduce this. I did have it happen to be yesterday before I made a change. I downloaded the latest DEV version dated March 1st and the code matched what I had locally. Just to be sure it's not some funky release issue. I have created a BETA1 release.
To fix this yesterday I used the reinstall module link on the devel block (http://drupal.org/project/devel) I thought this was the same as uninstalling then reinstalling but maybe not. Please give that function a try and let me know if it doesn't resolve the issue.
Comment #6
indytechcook commentedAfter my wife gave me a hair cut, it enlighten my head. I realized why I am able to get the menu items to show up and you are not. The hierarchy path requires a custom call back (views or using hook_menu for custom code) If you do not have a valid callback then the menu items will not appear.
Create a view with the path 'category/%' then rebuild the tax menu and they will show up.
The hierarchy path was just for legacy support in custom modules. They visual effect of having the url be category/vocab/term/term... can be solved using pathauto setting the path to 'category/[vocab-raw]/[copath-raw]' This uses the menu call back of 'taxonomy/term/%tid' so you use either use the default taxonomy handling or a view with the path 'taxonomy/term/%'
Comment #7
summit commentedHi,
Will test your proposal.
So first I need to build a view, not important what name? with path category/%
Then rebuild taxonomy_menu instead of de-install?
Than build through path settings: category/[vocab-raw]/[copath-raw] to keep the hierarchical settings which I use in my site.
Right?
Greetings,
Martijn
Comment #8
indytechcook commentedI mixed topic in my last post. Let me separate and try again.
The hierarchy path selection should only be used if you have a module that requires the arguments passed from the previous versions URL format.
If you have no code that relies on the url arguments and you want your URL to look like category/vocab/term/term.. then the recommendation is to set the path to 'default' in taxonomy menu and set the pathauto to category/[vocab-raw]/[copath-raw].
Martijn, do you have code that relies on the legacy URL?
For testing purposes, you can create a view with the path of 'category/%' and the menu items will show up.
Comment #9
summit commentedHi,
Thanks for your quick update.
If have former taxonomy_menu working with category/vocab/term/term.. so I think I have to set the path to 'default' in taxonomy menu and set the pathauto to category/[vocab-raw]/[copath-raw] then.
And this means I have no legacy URL, I think...What is legacy URL please?
I will test this this evening!
greetings,
Martijn
Comment #10
indytechcook commentedLegacy URL refers to supported the previous. Just in case someone did some custom coding against the old URL structure, they can still upgrade to this version. I don' see it being used very often.
Comment #11
summit commentedHi,
Thanks for the explanation. As I told you I would test this evening, so I have.
You can see this on: http://www.aanbiedingen-herfstvakantie.nl/
It works as you advocated. I used hierarchy setting, and builded a testview just to roll the hook I think? GREAT!
Now I can build hierarchical pages in D6 with taxonomy menu and other people can use taxonomy/term/[tid], right?
The only thing I do not get is the pathauto setting as you explained: [vocab-raw]/[copath-raw]
Is it so this setting can be used, AND the normal pathauto setting, so is copath-raw for both situations?
I ask this because almost all terms are pathauto-ed with the regular [catpath-raw] and I would very much to have this still.
Thanks a lot for all your effort until now!
Greetings,
Martijn
Comment #12
ksc commentedMartijn,
I´m following this thread.
Could you display content with Menu path=hierarchy using a view?
I looked at your site - but couldn´t see content under geografisch/nederlands.
I have the same problem.
see http://drupal.org/node/389756
Thanks Klaus
Comment #13
summit commentedHi Klaus,
Thats my second task with this!
And Yes I think I can get it to display the content I want, but may be that is not sufficient for you. It is not the taxonomy/category content I want to display.
I will use the hierarchical posibilities of /VID/TID/TID to show different templates.
This week I will try to get this done, and than you can see what I am talking about.
I did this already with a D5 site: www.wintersport-accommodaties.nl
It uses a little peace of code in settings.php to do this, see thread: http://drupal.org/node/192493
Hopefully it works the same in D6. Keep you posted.
Greetings,
Martijn
Comment #14
indytechcook commentedSorry for not responding to this yesterday. I had a cooking class and fell into a food comma.
It doesn't really matter what your autopath is set to . The only function path has is to change the display of the URL. Every argument sent to PHP (using the arg(x) command) is from the actual path and not the alias. I was only saying that you can have the URL display the way the previous version did by using the default path and autopath. It won't work for your situation though.
You may also look into using taxonomy_term_path with hook_term_path. This sets the term path to what every you want everywhere, not just taxonomy menu. If you do use this hook, I honor it in the default path. I didn't find this hook until this past weekend and have been thinking of removing hook_taxonomy_menu_path. The only reason I haven't is so you have somewhere to set the vocab item path. I just haven't updated the development documentation for my recommendation.
Here is the callback code for the default path selection. If you do something custom and will not be displaying a vocab level item, then I recommend you use the default path and hook_term_path to set the custom path.
If you use this method, then you can also use taxonomy setting in autopath correctly. Using this one hook could cut down on a ton of custom coding.
Sorry to bring this up now (better late then never) I just really didn't think about it before. I do thank you for your patience.
Neil
Comment #15
summit commentedHi Neil,
I think the current working situation is sufficient for my situation.
I also think it is not the nicest way to have to build a testview with category/% to get things showing, so thats may be a point of attention still.
The custom code I will use in settings.php is something along the lines of http://drupal.org/node/192493#comment-633741 with custom_url_rewrite.
So I do not need pathauto support, because I will create the urls from the hierarchical level with custom_url_rewrite.
if top level TID then country panel
if nextlevel TID (TID/TID)) then province level
if nextnextlevel TID (TID/TID/TID) then city level
if nextnextnextlevel TID (TID/TID/TID/TID) then accommodation level.
I do not exactly understand how to use the function taxonomy_menu_path_default code. Will you bring that in on taxonomy_menu.dev?
greetings,
Martijn
Comment #16
summit commentedHi Neil,
I have this code on a D5 site (without the <?php >?), but it is not working on D6.
D6 has now the function custom_url_rewrite_inbound(&$result, $path, $path_language) {
How can I alter this code, that it works on D6 please?
Thanks a lot in advance for your reply!
Greetings,
Martijn
Comment #17
summit commentedHi Neil,
I have got something working.
See: www.aanbiedingen-herfstvakantie.nl
But I see also that other vocabularies also get the taxonomy_menu settings (and I build testview with taxonomy_menu/%).
I did not be able to check for the right vocabulary, which is 5. I go to bed now..too long programming evening..
Greetings,
Martijn
Comment #18
indytechcook commentedI see what you are trying to do now. Here is a way to do this without any custom code. I am working on a way to do this without having to manual change the menu.
Create 3 vocabularies:
City
Region
Country
Comment #19
indytechcook commentedThinking about this overnight, the code I wrote might have an issues with $term->depth. I'm not sure the term object has the depth indicator in it.
Comment #20
summit commentedHi Neil,
Great you are thinking with me to build this solution. With this taxonomy_menu can become the module to build hierarchical websites!
I tried something like underneath to get to the depth.., but it doesn;t work:
Please help me out with this, thanks!
Greetings,
Martijn
Comment #21
indytechcook commentedHere you go Martijn,
I test this one and it appears to work pretty well. Use a view with an argument of $tid.
I am able to use some of this code to implement new features but deeper so coding this for free wasn't a problem, but if you need more customization, please contact me via my contact form and we can make arrangements.
Thanks,
Neil
Comment #22
summit commentedHi Neil,
I am not getting the depth to work. I changed the $depth country to 1, so the country Nederland (holland) gets country-info, but all terms underneath also get country-info, instead of region, city.
The menu_items from the geographical vocabulary have all the path: "country-info",
See: www.aanbiedingen-herfstvakantie.nl, the top item 'Nederland' and underneath.
Thanks still for getting into this!
Greetings, Martijn
Comment #23
summit commentedHI Neil,
May be I do this wrong. Your remark was
But I need one vocabulary:
Region is one term depth deeper.
May be I do this wrong..sorry than, I can't get the depth working, it is not showing the region and city custom urls: region-info, city-info.
EDIT: I updated back to your original summit.module, It only shows region-info on all depth levels...I just can't figure out how to change it..I am not a good enough programmer..sorry.
Thanks a lot for helping me. I really think that this can be an upgrade of taxonomy_menu to have hierarchical_templates support.
Greetings,
Martijn
Comment #24
indytechcook commentedI said use 3 vocabularies before I really knew what you were trying to accomplish. What you want is planed for the v3 version of taxonomy menu. klaus give me the idea to use taxonomy menu groups. It's though to explain but very flexible.
I'll try to take a look at this again.
Comment #25
summit commentedThanks Neil, tried to figure out myself..but unsuccesfull. Looking forward to your solution!
greetings,
Martijn
Comment #26
summit commentedHi Neil,
I can first try to work with my settings.php solution. I need to enhance it a little bit more to work only for the vocabulary I want. But I think I can handle this.
Than you can work on taxonomy menu groups solution to have the broather/structural solution.
Is this a good workplan?
Or do you think I can better wait a little bit to test your solution immidiately?
Greetings,
Martijn
Comment #27
indytechcook commentedGo ahead. I don't have an immediate fix with out debugging the code. Good Luck!
Comment #28
summit commentedHi Neil,
Do you have a rough planning for the solution withing taxonomy_menu_group ?
I will investigate the settings.php solution.
Will this work (not behind pc with ftp etc..):
Greetings,
Martijn
Comment #29
indytechcook commentedYes. See here: #388486: Basic considerations for latest version
I don't know much about 'custom_url_rewrite_outbound' but from looking at the api, make sure you change 'taxonomy_menu' to what every the base path is.
It looks like the function custom_url_rewrite_outbound is called when the url is being created so this is called when the menu item is being saved. Be sure you have 3 views with the path matching the beginning of your path variable. Otherwise the menu items will not have anything to route and and will not be created.
Also be sure to use the hierarchy path since it's the only path that truly send the URL in the format you need.
Comment #30
summit commentedHi Neil,
Still on the road..
1) Do you mean change "taxonomy_menu to what I described: country-info, region-info, city-info. Is this good?
2) I will have 3 panels, not 3 views. The panels will have block-view-panes. Is panels also ok for routing?
3) Yes I will use hierarchy path.
Off course this is only customizing, very eager to test your module-based new version!
greetings,
Martijn
Comment #31
indytechcook commented1. I'm talking about this line
if (preg_match('|^taxonomy_menu(/.*)|', $path, $matches)) {
The part in bold has to match what you have in the "base path for hierarchy menu"
Panels should work fine, as long as menu item has a preexisting menu router item.
Comment #32
summit commentedHi Neil,
Again thanks. Will tell you if I got things working on one site, but another site, it is somehow not working.
I filled a new bugreport because it is not completely relevant for this thread.
http://drupal.org/node/402888
EDIT: working now, was a view problem.
greetings,
Martijn