How do I create a path alias? I'm trying to create a path alias for a node type, where the first part of the alias is the url path of the organic group. I tried this    

[node:og-group-ref:1:url]/[node:content-type]/[node:title]


but it didn't work. When I tried this

[node:og-group-ref]/[node:content-type]/[node:title]


it did create an alias, but [node:og-group-ref] refered to the node title, not the path alias of the node.

From here - https://www.drupal.org/node/2302879 - saw that there are tokens for [node:og-group-ref:url:relative], but thats not a valid token on my site. I am using Organic groups 7.x-2.7.

Is this a possible alias?
I'm not sure what the real answer is to this issue, but I found a workaround: I created my own token which provided me this alias

/**
 * Implements hook_token_info().
 */
function example_tokens_token_info() {
  $types['og_path_alias'] = array(
    'name' =&gt; t('The OG Path Alias'),
    'description' =&gt; t('Tokens for the OG path alias'),
  );
  $og_path_alias['path_alias'] = array(
    'name' =&gt; t('The OG Path Alias'),
     'description' =&gt; t('The OG path alias'),
  );
  return array(
    'types' =&gt; $types,
    'tokens' =&gt; array(
      'og_path_alias' =&gt; $og_path_alias,
    ),
  );
}

/**
 * Implements hook_tokens().
 */
function example_tokens_tokens($type, $tokens, array $data = array(), array $options =     array()) {
  $replacements = array();

  if($type === 'og_path_alias') {
    $node = $data['node'];
    foreach($tokens as $name=&gt;$original) {
      switch($name) {
      case 'path_alias':
      $node_wrapper = entity_metadata_wrapper('node', $node);
      if($node_wrapper-&gt;__isset('og_group_ref')) {
        $chapters = $node_wrapper-&gt;og_group_ref-&gt;value();
        foreach($chapters as $chapter) {
          $new_alias = drupal_get_path_alias('node/' . $chapter-&gt;nid);
        }
      }
      $replacements[$original] = $new_alias;
      break;
  }
}
}

return $replacements;
}