Closed (fixed)
Project:
NodeSymlinks
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
24 May 2010 at 17:29 UTC
Updated:
5 Dec 2010 at 01:10 UTC
Jump to comment: Most recent file
Extracted from bug report #591112: "Duplicate URL Entry" error when updating node
Is there a way to get this to work with token? Our content works on [menupath-raw], is there a way to get it to do that per link item as well?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | nodesymlinks_808002_4.patch | 6.94 KB | scottrigby |
| #2 | nodesymlinks_808002_2.patch | 4.93 KB | scottrigby |
Comments
Comment #1
gooddesignusa commentedAlso something I'm interested in. subscribing
Comment #2
scottrigby@wojtha & gooddesignusa:
I added basic pathauto integration, a [nodesymlinks-menupath-raw] token, and added 'presave' to hook_nodeapi() so we get the nodesymlinks when we need them.
@todo: Currently this only works with one nodesymlink (the last one in the list - currently i only needed one, so I only got this far). To do that I think we'd need to load a nodesymlink object rather than $node, and evaluate the token in that context.
Also, pathauto_create_alias() changed between pathauto 6.x-2.x & 6.x-1.x. Currently there is one line that needs to be commented out depending on the version of pathauto running (this could be a configuration... we could use drupal_parse_info_file() to get the correct branch but that doesnt work with cvs checkout).
Please let me know what you think, before i go farther on this.
Comment #3
gooddesignusa commentedJust a note, after applying the patch you have to go to "Automated alias settings" located @ /admin/build/path/pathauto and re save before this works.
Comment #4
scottrigbyOk, updated patch:
$node->menu['nodesymlinks']['items'], rather than$node->nodesymlinks['items'], in nodesymlinks_token_values().Works on first node save now.
Still only works for one nodesymlink per node.
Also now gets module version now using drupal_parse_info_file(), for users who download the tarball of nodesymlinks.module from d.o.
@todo: still would like to find a way to get version if downloaded via CVS.
Additionally added nodesymlinks_perm() 'administer nodesymlinks' (though this might be best as a separate patch).
Comment #5
wojtha commented@scottrigby Nice work, I'm watchin' you ;-) When it will support multiple nodesymlinks I will integrate it.
... And yes, the nodesymlinks_perm() 'administer nodesymlinks' will be better as an separate patch.
Comment #6
gooddesignusa commented@scottrigby thanks again for all your hard work on these nodesymlink bounties. The site I needed it for couldn't of gone live without your help. I still haven't gotten an invoice for your past work. Just send it over and I'll have my boss paypal you. Thanks again.
Comment #7
3Dmusings commentedI would be very interested in seeing support for multiple symlinks per node of this patch. Any chance its coming soon? I'd be happy to chip in a little cash to help out.
I'm working on a project with top menus items like: Athletes, Parents, Sponsors, Coaches. The sub menus share a lot of redundant links and I'd love to be able to use pathauto to get results like:
athletes/Page-1
parents/Page-1
etc
or more simply put like mentioned above:
[menupath-raw]/[link-title]
Comment #8
wojtha commentedSubmitted to http://github.com/wojtha/nodesymlinks. Will release new version soon.
Comment #9
wojtha commentedFrom 6.x-1.0-beta2 is pathauto finally fully supported including Bulk update. However there is still no support for custom alias per symlink.
Comment #10
3Dmusings commentedOh wow, thanks for working on this. I will give it a test and get back to you. If you let me know where to, I'd be happy to send some money your way.
Comment #11
wojtha commentedCustom alias per item added in 6.x-1.0-beta3 release.