As node and other core entities, it could be useful to have basic classes added into the profile twig template, based on the view mode, the profile type, the profile id, and the isDefault property.

Patch follow

CommentFileSizeAuthor
#4 3083013-4.patch1.42 KBflocondetoile
#2 3083013-2.patch1.11 KBflocondetoile
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

flocondetoile created an issue. See original summary.

flocondetoile’s picture

Title: Add usefull classes into the profile Twig template » Add useful classes into the profile Twig template
Issue summary: View changes
Status: Active » Needs review
FileSize
1.11 KB
Martijn de Wit’s picture

Status: Needs review » Needs work

Really nice feature patch. Adding the view mode seems to be a nice addition.

One remark. I'm missing an update on the "Available variables:" block in the profile.html.twig. Because you added an extra variable it should be defined there as wel.

flocondetoile’s picture

Status: Needs work » Needs review
FileSize
1.42 KB

Hello @Martijn de Wit

You're right. Forgot it.
Patch attached with the variable added in the template comments.

Martijn de Wit’s picture

Status: Needs review » Reviewed & tested by the community

Nice one. Now it is waiting on one of the maintainers I guess :)

  • bojanz committed d34e83e on 8.x-1.x authored by flocondetoile
    Issue #3083013 by flocondetoile, Martijn de Wit: Add useful classes into...
bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.