Problem:
Currently when you change display settings of the profile to display more fields these are not displayed without making any required changes to the template.

Solution:
At least when you add new fields these should be displayed accordingly to the settings in the interface. This can be done by implementing a change like this:

diff --git a/themes/socialbase/templates/profile/profile--profile--default.html.twig b/themes/socialbase/templates/profile/profile--profile--default.html.twig
index 32664ae03..f31b0ef0d 100644
--- a/themes/socialbase/templates/profile/profile--profile--default.html.twig
+++ b/themes/socialbase/templates/profile/profile--profile--default.html.twig
@@ -122,6 +122,8 @@
       {% endfor %}
     {% endif %}
 
+    {{  content|without('field_profile_phone_number', 'user_mail', 'field_profile_address', 'field_profile_self_introduction', 'field_profile_interests', 'field_profile_expertise', 'field_profile_profile_tag') }}
+
     {% if (content|render is empty and user_mail is empty)%}
         {% trans %}{{ profile_name }} has not shared profile information.{% endtrans %}
     {% endif %}

Comments

jaapjan created an issue. See original summary.

jaapjan’s picture

Category: Feature request » Task
agamich’s picture

Status: Active » Needs review
agamich’s picture

Version: 8.x-2.x-dev » 8.x-6.x-dev

I've moved changes from 8.x-2.x to 8.x-6.x.
PR: https://github.com/goalgorilla/open_social/pull/1370

jaapjan credited Kingdutch.

jaapjan’s picture

Status: Needs review » Fixed

Merged to 5.x and 6.x

Status: Fixed » Closed (fixed)

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