Drupal - Organic Groups Title Token
Category:
I have an Organic Group, and a separate content type that references this Group Audience when creating nodes. I needed to set up Pathauto to automatically create a path like this:
my-group-node-title/my-content-title
This is the Pathauto token set up that worked for my content type:
[node:group-audience:0:label]/[node:title]
Other attempts at token configurations in Pathauto were not working the first time I saved the node. I had to re-open the node and save it to get the OG node title to appear in the url alias. The token listed above worked for me though!
Comments
Patrick (not verified)
Wed, 11/20/2013 - 11:56
Permalink
Tnx, that worked
Tnx, that worked
Bram Moreinis (not verified)
Wed, 12/11/2013 - 11:08
Permalink
Hmmm... "The Pattern for all
Hmmm... "The Pattern for all [Nodetype] paths is using the following invalid tokens: [node:group-audience:0:label]."
What am I failing to do? is there some code associated with this token?
-Bram
tyler
Wed, 12/11/2013 - 11:39
Permalink
I don't believe there was any
I don't believe there was any custom code to make that token available. At the time of the post, I'm pretty sure we were running the most recent version of the OG module... but that is almost a year ago now, and I no longer work on the site which inspired this post, so I'm not able to verify. It is possible the token was deprecated or has been replaced. I'd recommend checking your current version of OG, update it to the most recent. If that doesn't work, browse the OG release history and checkout older versions of the module to see what tokens were available in the module code.