Posted by Jody Lynn on May 6, 2008 at 4:23pm
12 followers
| Project: | Organic groups |
| Version: | 5.x-8.x-dev |
| Component: | og.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | sethcohn |
| Status: | closed (fixed) |
Issue Summary
I understand that new tokens can be a never-ending annoyance, but I think this one should be very useful when using og with pathauto. The idea is that the posts in a group can have their aliases look like children of the group node's alias. The patch adds an [og-path] token to allow it. The patch is working for me.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| token.patch | 1.4 KB | Ignored: Check issue status. | None | None |
Comments
#1
Interesting. Are you using pathauto for groups as well? If so, couldn't you mimic its logic for group posts and just add a node title at the end (for example).
#2
Yeah, I'm using pathauto for groups but I can't mimic the logic because I'm using tokens for the groups other than just [node-title] or [node-id]. (The group paths are based on taxonomy of the group node in my case, but you would have the same problem if you based your group's paths on a field within the group or many other tokens or if you manually assigned group paths.)
#3
This is just what we needed! We used your patch and it's working great. Thank you so much.
#4
Just hit this same issue myself, and came up with a near identical patch. My version uses the same naming/description convention as the pathauto URL alias tokens (e.g. bookpathalias, termalias etc), which I think is more correct (path should indicate only a system path such as node/123, but we actually want the alias) and is better for consistency. There is also a minor indenting issue that is resolved.
The reason why I need this is for breadcrumbs with custom_breadcrumbs or workflow_ng - I can use node/[node:og-id] to create the alias to the group, but this falls down when I want to link to a sub-path of a group (i.e. groups/blah-group/activities) but but making "groups/blah-group" available as a token I can do this. I can't add the title to the path as Moshe suggests because it needs to be pathautoized (i.e. I would get "groups/Blah Group/activities", which doesn't work).
I am happy to roll a D6 patch if anyone is interested.
#5
Interested! Maybe you could help with creating the same for OGsubgroups in D6. I tried to create Breadcrumbs and Paths, but I didn't manage to do it... Any help would be really appreciated. Thanks!
#6
A D6 patch would be very helpful. Thank you.
#7
Thank you!! That's exactly what I was looking for :)
#8
Updated patch for 5.x-8.x
A Drupal 6 patch would be welcome :)
#9
A Drupal 6 patch would be VERY welcome :)
#10
Looks good to me. I'll roll this into the next OG 5.x version...
Here's a patch for 6.x-2.x-dev so we stay consistent.
#11
Committed to 6--2. Seth will commit to 5--3
#12
#13
Automatically closed -- issue fixed for 2 weeks with no activity.