Closed (fixed)
Project:
Open Social
Version:
8.x-6.x-dev
Component:
Front-End
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 May 2018 at 07:27 UTC
Updated:
29 May 2019 at 19:34 UTC
Jump to comment: Most recent
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
Comment #2
jaapjan commentedComment #3
agamich commentedI added it in this PR: https://github.com/goalgorilla/open_social/pull/1346
Comment #4
agamich commentedI've moved changes from 8.x-2.x to 8.x-6.x.
PR: https://github.com/goalgorilla/open_social/pull/1370
Comment #6
jaapjan commentedMerged to 5.x and 6.x