Closed (fixed)
Project:
Subgroups for Organic groups
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2009 at 16:01 UTC
Updated:
17 Nov 2010 at 02:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
rcross commented+1
Comment #2
rcross commentedThis is actually a bit of a duplicate of this post http://drupal.org/node/293325 but I think this is a more generic issue.
Comment #3
morbiD commented+1
As mentioned in #867124: Assign subgroups/parent groups while creating new group, I'm currently working around the lack of subgroup tokens by setting up a taxonomy that mirrors my group hierarchy, then making pathauto use [termpath-raw] for group node aliasing.
Comment #4
bschilt commentedToken support would be helpful. What kind of tokens do we need?
- Parent group title
- parent id
- full lineage (excluding the current node)
Comment #5
morbiD commentedThose sound good for starters. I think the full lineage is definitely the most important one initially.
Maybe a "group type lineage" would be useful to someone as well? I can't think of a good use case, but taking a useless geographic example: if "full lineage" gave a path of europe/france/paris, then the "group type lineage" might give a path of continents/countries/cities/france. Of course, that would assume the user had created different content types for each level in the hierarchy.
Possibly also title/type/id tokens for the top level of the hierarchy?
Comment #6
bschilt commentedHere's a patch that adds the following subgroup specific tokens:
The ['subgroups-path'] and ['subgroups-path-raw'] tokens will respect pathauto's "General Settings" and "Punctuation Settings"
I chose not to add tokens that build a path based upon the node types of all parent groups because in order to get the types of each group in the path I would need to use node_load. That seems like too much overhead and I don't want to write a custom sql statement to get the data because that's no the "drupal way".
If someone absolutely needs it than we can discuss it more.
Let me know if there's any other types of tokens we need.
Comment #7
morbiD commentedLovely! The path tokens work perfectly on my test site. Haven't tried the title and id tokens but the code for them looks fine.
Thanks!
Comment #8
bschilt commentedthis patch has been committed.