1

I have a site using Organic Groups. I would like to have the News content type use one pathauto pattern for News pages that are part of an organic group such as "group/[node:og_group_ref]/news/[node:title]" but when not in an organic group use "news/[node:created]/[node:title]".

Is this possible without having to write custom PHP token code? If not, I guess I could create a clone of the News content type called Lab News to use just to have a different pathauto pattern.

  • It seems it is not currently possible - pathauto knows nothing about OG, so if OG does not provide tokens for pathauto, you need to provide them on your own. And it seems it does not. So the choice is - do you prefer to write it as your own module, or maybe as a patch to OG? – Mołot Dec 13 '13 at 8:57
  • This is not specifically about organic groups. This could be about any characteristic of a content type that you want to use different pathauto patterns on depending on the value of some other field in the type. OG definitely provides tokens. That is what [node:og_group_ref] is. – raines Dec 13 '13 at 14:45
  • Well if you want to integrate anything with pathauto, it would make your question too broad. You should only ask practical, answerable questions based on actual problems that you face. - "any characteristic" hardly constitutes actual problem. – Mołot Dec 13 '13 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.