I would like to create a custom block / view to display a welcome message to the currently logged in user in Drupal 8. I followed this answer but it isn't working for me. Maybe things changed in D8. Is there a way to do it in D8 and / or am I doing something wrong?

I've added a bunch of Fields and Contextual Filters trying to get it to work but nothing shows up.

enter image description here

1 Answer 1



  1. Remove all the contextual filters, that you added. They are not necessary. You have already a filter criteria for the current user.
  2. Change format from table to an unformatted list.
  3. Remove all the fields except first name, last name.
  4. Click on first name and exclude it from display.
  5. Click on last name. Find the fieldset to override results, expand it.
  6. Write your message there. It should look like: Welcome {{field_first_name}} {{field_last_name}}. You can look up the exact tokens in a fieldset below the text field.
  7. Save the views.
  8. Place your block in some region at /admin/structure/block.
  • Thank you! That worked perfectly. Much appreciated.
    – jbreslow
    Commented Jun 8, 2021 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.