Active
Project:
pathmenu
Version:
4.7.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2007 at 15:47 UTC
Updated:
5 Nov 2008 at 10:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedNot really. I actually work only under Drupal 4.7, that's why there is no Drupal 5 version of pathmenu.
You're welcome. It shouldn't be that hard (though I don't know for sure) since the module is quite simple in its Drupal interaction. If there's anything I can do, just ask for it !
Comment #2
sigsby commentedI've had a go at updating this for drupal 5.1, but can't seem to make it work. My updates so far:
1. added the .info file
2. commented out hook_help
3. updated the menu (for the settings page)
4. updated the form validate and submit functions
I'm working in function _pathmenu_execute_rules() and the phpcode seems to be generated and does evaluate, just no result in the site. I have a few pointers and questions in this function:
Shouldn't this
...be this
I also am failing to see how the pathmenu_add_menu does anything, and what the array_merge in the menu hook is doing. The only thing the stored php code is doing is calling menu_set_location. I don't see how any values are being returned to the menu hook.
My rule:
The resulting phpcode to be evaluated:
... or cleaned up
I even tried hardcoding the phpcode instead of using eval, still no go. I haven't looked into any of the other functions or files, but I'm assuming they are just for generating the phpcode that is stored in the db and eval'd from the menu hook.
I'm attaching my modified module.
Comment #3
Anonymous (not verified) commentedI think you're right (and it's way more elegant). I will look at it.
pathmenu_add_menu works in two ways :
The aim of this function is to use the fact that pathmenu_menu (hook_menu) returns an array of items to add to the menu system. Thus the line
$items=array_merge($items,_pathmenu_execute_rules($phpcode));merges the menu items from the pathmenu module with the possible menu items generated by the actions.
It should work as expected. I assume you will have biography nodes and you want the breadcrumb to show "home >> about >> team" for each of these nodes. Am I right ?
Don't forget that the generated PHP code is meant to be executed within an environment (for example it assumes $nodenid, $nodetype and $nodeterms are predefined).
That's exactly how it is.
Comment #4
summit commentedHi,
Is there a drupal 5 version please?
Thanks a lot for considering this!
greetings,
Martijn
Comment #5
murzSubscribe