I have a node that has a parent_field (entity reference) that if left empty, that node is a parent. If parent_field has data (ie the nodes parent node name) then I can easily add pathauto in there like so:
[node:parent_field]/[node:title]
However, I would like to be able to select a child as a parent and have pathauto gather this in to the path. Basically getting the parent and child entity reference:
[node:parent_field]/[node:parent_field(child of parent???)]/[node:title]
However, in pathauto (entity tokens included), I don't see how to grab this.
Thoughts?
EDIT:
I was able to do this by chaining entities. @Clive in the comments and a post online helped me figure this out.
In the end my pathauto looks like so:
program/[node:field_parent_program:entity:field_parent_program:entity:title]/[node:field_parent_program]/[node:title]
[node:parent_field:entity:parent_field]
. But be careful using nodes for this, it'll be easy enough to end up in an "I'm my own Grandpa" type of situation :)