Need to combine custom fields with default fields on user profile page | Community
Skip to main content
robin97009708
New Participant
Apr 12, 2018 1:58 PM UTC
Solved

Need to combine custom fields with default fields on user profile page

I have an overlay for the user profile at /apps/social/console/components/hbs/userprofile/userprofile.hbs.

This page contains a component that brings in data from the user's custom profile to display on the same page as the user's default AEM profile.

The client wants to rearrange the order in which the fields display, which means intermixing custom and default fields.

How do I access the model to bring in the custom data, not as a component but as individual data fields (ex. customProfile.middleinitial) that can be called like the default fields in the HBS (ex: {{profileProperties.gender}})?

This is a simple matter with HTL, which is how the current component works, but I can't find any references for how to do this with HBS.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Rahul_Bhardwaj
Rahul_BhardwajAccepted solution
Employee
Apr 20, 2018 9:43 AM UTC

Hi,

1. The client wants to rearrange the order in which the fields display, which means intermixing custom and default fields.

2. How do I access the model to bring in the custom data, not as a component but as individual data fields (ex. customProfile.middleinitial) that can be called like the default fields in the HBS (ex: {{profileProperties.gender}})?

Both #1 and #2 are unrelated, which also means #2 is not a way to achieve #1.
#1 can be achieved by rearranging fields in hbs in overlaid file.
If #2 is also a separate requirement, you have to extend the respective community. Refer [0] for documentation and [1] for example code.

[0] - Server-side Customization

[1] - aem-communities-extensions/aem-communities-journal-extension at master · Adobe-Marketing-Cloud/aem-communities-extension…

Hope that helps!

2 replies

smacdonald2008
Level 10
Apr 20, 2018 11:52 AM UTC

Thank you Rahul Bhardwaj for providing your input.

Translate
Rahul_Bhardwaj
Rahul_BhardwajAccepted solution
Employee
Apr 20, 2018 9:43 AM UTC

Hi,

1. The client wants to rearrange the order in which the fields display, which means intermixing custom and default fields.

2. How do I access the model to bring in the custom data, not as a component but as individual data fields (ex. customProfile.middleinitial) that can be called like the default fields in the HBS (ex: {{profileProperties.gender}})?

Both #1 and #2 are unrelated, which also means #2 is not a way to achieve #1.
#1 can be achieved by rearranging fields in hbs in overlaid file.
If #2 is also a separate requirement, you have to extend the respective community. Refer [0] for documentation and [1] for example code.

[0] - Server-side Customization

[1] - aem-communities-extensions/aem-communities-journal-extension at master · Adobe-Marketing-Cloud/aem-communities-extension…

Hope that helps!

Translate