By Tomas Bolling Nilsson on Tuesday, 11 May 2021
Posted in General Issues
Replies 7
Likes 0
Views 461
Votes 0
Hi there,

I would like to render some of my custom profile fields in the sidebar. I have no problem to render the custom fields, but i cant find were i should place the rendering code so that it only appears in the profile page. I have been looking for the correct file to add my code in, but cant find the correct template file to edit.
Can you check my attached screenshot and see is this the sidebar position you would like to add your custom field in?

If yes, this is the original file JoomlaFolder/modules/mod_easysocial_sidebar/tmpl/profile.php render the profile page sidebar data.

This is the path you should copy the original file over to your current template directory folder, so this changes file will not get affected when you update to the next release version.

JoomlaFolder/templates/yourCurrentTemplates/html/mod_easysocial_sidebar/profile.php
·
Tuesday, 11 May 2021 18:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi again,

Sorry, i cant see any attatched image ?
·
Tuesday, 11 May 2021 19:03
·
0 Likes
·
0 Votes
·
0 Comments
·
I am sorry that I forgot to add the attachment from my previous reply.

Can you give it a check again? https://stackideas.com/forums/add-fields-to-profile-sidebar#reply-543650
·
Tuesday, 11 May 2021 19:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi again,

Yes that's the correct position So I want to add my code for the custom fields to that sidebar, I have tried to add the profile.php to my override, but no matter what code im adding it docent show up.
·
Tuesday, 11 May 2021 20:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Perhaps you can share with us that PHP file so that we can quickly take a look?

May I know what custom field value you would like to show?

Ensure that the custom field unique key you pass correctly from your code, you can verify your unique key from the backend > Easysocial > User > Profile Form Builder

EDITED
·
Wednesday, 12 May 2021 09:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi again,

Thes is the code that I try to add <?php echo $user->getFieldValue('TEXTBOX-6');?>

I have tried to place it in multiple places in the file but without any success.

Perhaps you can share with us that PHP file so that we can quickly take a look?

May I know what custom field value you would like to show?

Ensure that the custom field unique key you pass correctly from your code, you can verify your unique key from the backend > Easysocial > User > Profile Form Builder

EDITED
·
Wednesday, 12 May 2021 19:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Thes is the code that I try to add <?php echo $user->getFieldValue('TEXTBOX-6');?>

This code only return you an object if you var_dump($user->getFieldValue('TEXTBOX-6')); this on the page.

So you have to decide which properties you want to show, you can try this way :


$customField = $user->getFieldValue('TEXTBOX-6');
echo $customField->value;
·
Thursday, 13 May 2021 10:49
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post