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.

AttachmentSizeStatusTest resultOperations
token.patch1.4 KBIgnored: Check issue status.NoneNone

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

Version:5.x-7.0-rc5» 5.x-7.3

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.

AttachmentSizeStatusTest resultOperations
alias-token.patch1.49 KBIgnored: Check issue status.NoneNone

#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

Version:5.x-7.3» 5.x-8.x-dev

Updated patch for 5.x-8.x
A Drupal 6 patch would be welcome :)

AttachmentSizeStatusTest resultOperations
255335.patch1.58 KBIgnored: Check issue status.NoneNone

#9

A Drupal 6 patch would be VERY welcome :)

#10

Version:5.x-8.x-dev» 6.x-2.x-dev
Assigned to:Anonymous» sethcohn

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.

AttachmentSizeStatusTest resultOperations
ogtoken-D6.patch1.1 KBIgnored: Check issue status.NoneNone

#11

Version:6.x-2.x-dev» 5.x-8.x-dev
Status:needs review» reviewed & tested by the community

Committed to 6--2. Seth will commit to 5--3

#12

Status:reviewed & tested by the community» fixed

#13

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here