Pathauto token for group's node type
Michelle - April 27, 2008 - 21:19
| Project: | Organic groups |
| Version: | 5.x-7.0-rc5 |
| Component: | og.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I apologize if there's already a way to do this. I searched but had no luck.
I want to create two different types of groups on my site by using two different node types for the groups. But the actual posts that go in them will all be "discussion" types (thanks g.d.o for the name idea :). When configuring pathauto for the discussion nodes, I would like to be able to use the group's node type at the start of the path.
This would look something like:
[ogtype-raw]/[ogname-raw]/[title-raw]
Thanks,
Michelle

#1
thee are potentially a ton of tokens from the group node one might want. token module is rather evil in the way it spreads, and slows down a site in the meanwhile.
anyway, this is reasonable. patches welcome.
#2
I really needed this ASAP so I figured it out and added it to my copy of the module. The way I did it isn't the best as I duped the title query rather than reworking it to get both values from one query. I'll try to find a bit of time to redo that better and then submit a patch.
I know what you mean about tokens getting nuts but this shouldn't be too bad since it can be gotten from the same query that's already there.
Michelle
#3
Hi
I made the same hack as Michelle describes (see patch), but im also interested in a better solution. Please write if you have any ideas for a better implementation :)
- A