Closed (fixed)
Project:
DHTML Menu
Version:
7.x-1.x-dev
Component:
PHP Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
7 Nov 2008 at 12:55 UTC
Updated:
4 Dec 2008 at 19:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
cburschkaThere is a misunderstanding. DHTML Menu's functions are not theme functions and cannot be overridden. They themselves override theme functions.
I am sorry, but it is impossible to affect these functions without editing the files directly.
Comment #2
cburschkaHey, now I understand what you want - you need to override the functions yourself, but cannot because the module hijacks them and then directs to the base theme function. Instead of calling the base function, I could call the overriding function if one exists.
Comment #3
light9 commentedYes, thank you. I just need to add to my links in navigation menu few attributes: class="ajax" name="ajaxify". I made it by deleting dhtml_menu_theme_menu_item_link function from dhtml_menu.module and add this edited function in my template.php file:
I just want to keep module files clean and not edited for future upgrading and make all overriding in me theme files.
Thank you.
Comment #4
cburschkaWill do. I'm working on the feature right now.
If devel_themer can do it, so can I - in fact, I have it a lot easier since I just need to dispatch and not intercept all kinds of information.
Comment #5
cburschkaThis works for me. Please test it with your set-up too, to make sure I didn't miss anything.
Before the module replaces the theme function "theme_menu_item" (which could already have been overridden with "garland_menu_item") it now stores the original function name, and calls that after doing its interception work. So you can override this function in the theme layer and know that eventually it will get called.
Comment #6
cburschkaHah.
Not THAT again. I hate it when d.o doesn't save the attachment.
Comment #7
cburschkaHah.
Not THAT again. I hate it when d.o doesn't save the attachment.
Comment #8
cburschkaLOL! And now it saved it twice to make up for it. =D
Comment #9
cburschkaI'd like some feedback before I commit this to a production branch.
Comment #10
light9 commentedHi. I'am sorry for delay in answer.
It works!
I upgraded module to 6.x-3.2, patched it and tried to add in my template.php this:
And theme output changed. I need all this changes to ajaxify my theme and use it together with this great module.
Thank you for this nice module and your support!
I will follow with updates.
Comment #11
cburschkaThank you very much for your feedback! :)
I've committed this patch to DRUPAL-6--3 now. I'll wait for a week or so for users of 6.x-3.x-dev to complain about potential problems before I'll release it as stable.
In the meantime, I need to port this to Drupal 7.
Comment #12
cburschkaHere we go.
Comment #13
cburschkaCommitted to HEAD.