I was needed to use tokens in link titles. I've already solved this problem and will send patch soon.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 974742-menu_token-add-css.patch | 199 bytes | ygerasimov |
| #9 | menu-token-titles-with-tokens-974742-9.patch | 7.66 KB | ygerasimov |
| #8 | menu-token-974742-8.patch | 5.56 KB | dealancer |
| #7 | menu-token-974742-7.patch | 2.98 KB | dealancer |
| #1 | menu-token-974742-1.patch | 5.77 KB | dealancer |
Comments
Comment #1
dealancer commentedHere is a patch. It works almost perfect (small thing to do: disallow replacing tokens while showing the list of menu item on admin menu page).
Yuriy, please grant me access to CVS, so I can commit changes and port it to D7/D5. My cvs account is vackar.
Thx
Comment #2
ygerasimov commentedVadim, thank you for the patch.
Lets not change variable 'menu_token_enabled' to 'menu_token_paths'. Otherwise we need update path for people who will update this module.
'menu_token_titles' variable is never used.
Trailing spaces introduced.
Lets also fix the admin page before this patch gets committed. But I am not sure whether it is possible to determine whether the link is in the table or somewhere else on this page.
Powered by Dreditor.
Comment #3
deleuje commentedI am looking at this module for this exact use.
I don't mind the admin issue as the menu will only be visible to non-admin roles (using menu_per_role) . Should I go ahead and use the submitted patch? Also, would it work against the current dev (since it is very recent)?
Thanks!
Comment #4
deleuje commentedI tried and the patch fails against the current dev version. (3 out of 5 hunks failed).
Comment #5
dealancer commenteddeleuje, thanks for testing.
Ok, I will rewrite it for the dev version with Yuriy's comments.
Comment #6
dealancer commentedThe only way I can fix issues on the admin page (i.e. show menu items without token replacements) is to use global variable $menu_admin[1] in menu_overview_form(...)[2].
[1] http://api.drupal.org/api/drupal/developer--globals.php/global/menu_admin/6
[2] http://api.drupal.org/api/drupal/modules--menu--menu.admin.inc/function/...
Comment #7
dealancer commentedHere is a patch, it keeps variable name the same as in trunk and fixes admin issue. I haven't tested it other modules which provide admin menu functionality yet, but will do soon.
Comment #8
dealancer commentedI have tested patch and it works perfectly with http://drupal.org/project/menu_editor.
However I have made new version of patch to indicate if tokens are used for an item.
Comment #9
ygerasimov commentedGreat catch with
global $menu_admin;
I have added some theming to make menu links page nicer. Please review the patch.
Comment #10
dealancer commentedI have commited last patch. Thanks to ygerasimov for updates and thanks to develCuy for giving me CVS access.
Comment #12
dealancer commented@Yuriy, have you forgotten to include css file?
Comment #13
ygerasimov commentedYes. I have forgotten to add it. Find attached patch. Please review.
Comment #14
ygerasimov commentedI have committed css file to repo.