You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either going down the preg_match() route or rebuilding the link using existing arguments.
// Remove "Group node" from title on node add forms within group.
$page_title = $variables['title']->render();
preg_match('/Add Group node \((.*)\)/', $page_title, $matches);
if ($matches[1]) {
$variables['title'] = t('Add @type', ['@type' => $matches[1]]);
}
or
// Remove "Group node" from title on node add forms within group.
$page_title = $variables['title']->__toString();
if (str_starts_with($page_title, 'Add Group node')) {
$variables['title'] = t($variables['title']->getUntranslatedString(), ['@name' => $variables['title']->getArguments()['@name']->getArguments()['@type']]);
}
Having spoken with @rupertj it appears that the proper way of doing this is adding a service that points to a custom UI Text Provider (or something similar).
Feels a bit beyond me, but I may poke it with a stick to see what happens.
Remove the "Group node" on the add content page
The text was updated successfully, but these errors were encountered: