Skip to content

Link github user name to github account in user profile #1

Description

@holybiber

This should be possible with something like

/**
 * Implements hook_ENTITY_TYPE_view().
 */
function TODO_node_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode)
{
  if ($display->getComponent('field_github_name')) {
      $build['field_github_name'] = [
        '#type' => 'markup',
        '#markup' => TODO sanitize and make link to github,
    ];
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions