I have a use case where I want to display the group type in the custom breadcrumbs module. There is an og token for [og-type] but I need to display the 'name' of the og-type. I added two lines of code to the og.module to add this token and thought I'd suggest it here so it could be used by others. The code is based on what the token module already does for the node type name.

function og_token_list
$tokens['node']['og-type-name'] = t("Type of top group (user-friendly version)");

function og_token_values
$values['og-type-name'] = node_get_types('name', $group->type);

Comments

shenzhuxi’s picture

tested and confirmed