I thought it would be nice to have the parent item's URL alias available as a token in addition to the parent's menupath. This comes in handy especially when using pathauto on the child nodes.
So here's a patch! It checks to see if the parent node has an alias, and if it does it makes it available as a token. If not, it just defaults to an empty string like the rest of the tokens in this module.
| Comment | File | Size | Author |
|---|---|---|---|
| relativity_url.patch | 1.24 KB | theunraveler |
Comments
Comment #1
theunraveler commentedComment #2
dandaman commentedtheunraveler, on the site you designed this for it no longer works. I'm not sure if something on the site broke or the Node Relativity code changed or what but the $node object doesn't seem to get the parent even though it's weight in the modules list is lower than pathauto. I added a node_load to when the object was set as $node and now it seems to work.