Posted by q11q11 on July 9, 2012 at 9:30am
2 followers
Jump to:
| Project: | Pathauto |
| Version: | 7.x-1.1 |
| Component: | Tokens |
| Category: | bug report |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hello!
For a content type I created custom field_test of List|text type, with items like
key1|label1
key2|label2Then I try to use it in patterns to autogenerate aliases.
I want generated path to be /key1/1 and /key2/2
Pattern looks like [node:field_test]/[node:nid] and i suppose that it will do what i want, but...
Generated aliases are just /label1/1 and /label2/2
Comments
#1
Having the same problem. I think it relates to this #1220534: Fields in path which is now closed, but that relates to this #691078: Field tokens which is still open, and has been for some time.
I'm trying to work around this using hook_node_submit or hook_node_insert, but I don't have it working yet. I also feel this is kinda hacky, but whatcha gonna do :)
I'll post a response if I get it working.
div
#2
We use hook_pathauto_alias_alter() with modification of alias itself, then just bulk update.
But it`s just workaround.