Had a requirement to pass the referenced node's raw path along to pathauto for generation of the final URL. Patch attached.

Comments

greggles’s picture

Title: Add a raw path token for referenced nodes » Add a path token for referenced nodes
Status: Active » Needs work

Seems reasonable to me, though it should be just the path, not "-raw". -raw is reserved for places that contain user input that has not been sanitized. The url() function performs sanitizing to protect users.

robschmitt’s picture

Status: Needs work » Needs review
StatusFileSize
new772 bytes

You're right, of course. I've changed 'path-raw' to path, and updated the patch (attached). Seems to work OK in my testing.

dww’s picture

Status: Needs review » Needs work

There are cases where you also need a token for the absolute path, e.g. in emails etc.

dww’s picture

Assigned: Unassigned » dww
Status: Needs work » Needs review
StatusFileSize
new1.14 KB

Like so.

dww’s picture

Status: Needs review » Closed (duplicate)

Ugh, I just found #222214: Provide tokens for referenced node (and user) url (absolute) and path alias (relative) even earlier, and with "alias" tokens for referenced users, too. *sigh*. So much for fending off duplicates as they come into your issue queue, huh? ;)