Closed (won't fix)
Project:
Menu Token
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
16 Nov 2010 at 22:43 UTC
Updated:
20 Feb 2015 at 04:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ygerasimov commentedAt the moment only global tokens are supported. But it would be nice feature if we can support node tokens as well (if /node/X page is viewed).
Anyhow you will need to export profile user uid token in your own module.
I will try to implement 'specific' tokens replacement and advise in this issue.
Comment #2
citlacom commentedHere is the patch for the implementation of support for users and node tokens and the extension of the help info that describe all the available tokens.
Comment #3
khalor commentedPatch applies cleanly and I see the additional tokens in the available replacements patterns but using them in a menu path results in:
The path 'path/to/[token-value]' is either invalid or you do not have access to itComment #4
dealancer commented@Khalor probably it happens when your are not seeing node/user profile, that's why this token could no be applied.
In general case there could be several possible cases of using node/user/taxonomy tokens, etc...
1) Context case: module could parse token in the menu title/path for the entity (node/user profile) that is being viewed.
2) Manually selected case: module could parse token for specified entity.
3) Probably more...
In general this is an Idea how it should look like:
We need to be able other modules to extend this functionality, hence we need a hook, which allows to add different kinds of menu token handlers for the tokens. Basically there should be an callback function which returns object.
We need somehow to be able to alter form elements probably using form_later functions. Also we need to add a checkbox "Hide menu item if it could not be parsed".
Comment #5
develcuy commentedComment #6
brunorios1 commentedi get this error when applying the patch.
patch: **** Only garbage was found in the patch input.
Comment #7
brunorios1 commentedi applyied the patch manually...
i used the token [nid]...
but in the node, the link of the menu link was printed node/[nid]/pictures...
Comment #8
dealancer commentedI have created separate brunch for it: http://drupalcode.org/project/menu_token.git/shortlog/refs/heads/7.x-1.x.... I am actually working on 7th version of this module, after it would be finished we could back-port changes.
Comment #9
dealancer commentedIt still needs work to have some kind of form support for the handlers.
Comment #10
dealancer commentedIt still needs work to have some kind of form support for the handlers.
Comment #11
dealancer commentedComment #12
dealancer commentedComment #13
btopro commentedsub, though I was able to get this working by adding my own version of the alter hook used in the module
This allowed me to use the node arguments which include OG stuff (horay)
Comment #14
fubhy commentedWe now support plugins for advanced tokens like this... The most basic tokens are working (node from context, user from context, taxonomy term from context) and many others are to come. Check out this new feature in the latest dev version.
Comment #15
brunorios1 commentedreally? this is great!
for which version? D6, D7 or both?
thanks!
Comment #16
fubhy commentedCurrently only D7. I don't work with D6 and am therefore not really interested in a D6 backport.
Comment #17
btopro commentedThat code I have posted is D6. If you download ELMS there is a working example that has some global tokens in it as I'll be dropping this project in favor of the functionality I've included.
Comment #18
fubhy commentedThe code in #13 might cause funny behavior on pages that are not node pages since it just blindly includes node_load(arg(1)) as a node not even knowing if arg(1) refers to a node. If you want a real implementation for this for D6 you might want to backport my code to D6.
Comment #20
dealancer commentedI have added code to user defined and random handlers. However they still needs to be updated, so I am creating new issue.
Comment #21
dealancer commentedHere is an issue http://drupal.org/node/1283804.
Comment #22
dealancer commentedNow we need to back port it to D6.
Comment #23
klonosTill #750352: Provide an option to also offer dev builds as updates if they are newer - for advanced users & beta testers is fixed, can someone please update the latest devs (both 6.x & 7.x) so that they are newer than stable ones? Thanx in advance ;)
Comment #24
zarudnyi commentedHi! Is there any progress?
I just trying to use this module with OG for group menu customizing.
Comment #25
protoplasm commentedThis is a feature for D6 that I would very much appreciate as well. I've been looking for a way to dynamically create menus for different organic groups. This seems like the ideal solution. Is there any way to create a customized token workaround while waiting for a backport from D7? Thanks.
Comment #26
zarudnyi commentedprotoplasm, you can use Panels with custom panes for creating menu for OG. Sorry for off topic.
Comment #27
jwilde commentedAre there any near term plans to add functionality to support additional tokens?
Thanks, Jim
Comment #28
penyaskitoThe workaround at [#973882-13: additional tokens needed] worked for me.
Comment #29
markconroy commentedWhere do you add [#973882-13: additional tokens needed] to get it to work?
Comment #30
develcuy commentedD6 is discontinued.
Comment #31
develcuy commentedThis is not required anymore, since the integration with Entity API allows to have tokens from all configure entities.