Quasi Patch: Additional token for group type (formatted name)

Created on 14 July 2010, over 14 years ago
Updated 28 October 2024, about 2 months ago

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);

✨ Feature request
Status

Closed: outdated

Version

2.1

Component

og.module

Created by

πŸ‡ΊπŸ‡ΈUnited States caschbre

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024