Posted by theunraveler on November 6, 2009 at 8:33pm
Jump to:
| Project: | Node Relativity |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
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.
| Attachment | Size |
|---|---|
| relativity_url.patch | 1.24 KB |
Comments
#1
#2
theunraveler, 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.