1

{exp:member:custom_profile_data member_id='{member_id}'}{full_name}{/exp:member:custom_profile_data}

The code above doesn't show anything. if I change the {member_id} global variable to a number it does work. Why isn't it working when the variable is in there? {member_id} displays correctly when used outside of the tag.

  • Also tried {exp:member:custom_profile_data member_id="{logged_in_member_id}"}{full_name}{/exp:member:custom_profile_data} with no success. – Mike Lohrman Jul 18 '13 at 16:14
  • Did you try adding parse="inward"? I don't think that is it, but worth a shot. – Justin Kimbrell Jul 18 '13 at 16:54
2

{member_id} and {logged_in_member_id} are standard global variables. All global variables are parsed after the modules. Take a look at the Template Engine documentation. The modules tags are the 15th item parsed, while the {member_id} is 24th and {logged_in_member_id} is 25th.

So, when the template engine parses the exp:member:custom_profile, the member_id isn't available yet.

By the way, you don't need to fill the member_id parameter because its default value is the current logged member.

| improve this answer | |
  • Thanks! I had tried it without the member_id="" but it wasn't working originally. I had the {full_name} member custom field named {name} and it wasn't displaying for some reason. After I changed it to {full_name} I never went back and tried it without the member_id=""...anyywaaayyyss, thank you, it's working great now! – Mike Lohrman Jul 18 '13 at 17:19
1

You should see ExpressionEngine's Parse Order (http://loweblog.com/downloads/ee-parse-order.pdf). You can see that user defined global variables are being parsed at last.

But if you would like to show the logged in member's profile data there is no need to pass member_id parameter.

See this statement within user doc (http://ellislab.com/expressionengine/user-guide/modules/member/#custom-profile-data-tag)

Specifies a particular member’s information to display. By default (if you do not include the member_id parameter), the tag will simply display information pertaining to the currently logged-in user.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.