Token for user being viewed I am formatting the user profile page in Drupal 8.9.2.
Are tokens available for the user being viewed (in user profile page), to display the user information?
I am using the Token and the Token Filter modules for this.
(edited: 8:44 AM 10 Sep 20)
I have solved the problem this way.
(1) I created a View to show desired user information.
(2) Then, I added a 'Contextual filter' to point to the user being viewed. (with the options &quot;User ID &gt; Provide default value &gt; Type: User ID from route context&quot;)
(3) Then, I selected 'REWRITE RESULTS' and &quot;Override the output of this field with custom text&quot;. As a result replacement tokens become available for user fields. I used that for formatting the Information according to the requirement.
Then, I placed this View block at the desired place.