I for the life of me cannot figure out what variables/strings to use to print any of the profile fields for the user-profile.tpl.php page. I have looked all over on Drupal and nobody has come up with the correct answer. What worked for Drupal 5 does not work for Drupal 6. When you create a user-profile.tpl.php page in the theme folder it is automatically detected and used. All I want to know is how to print the fields that are entered during the registration. It should be some simple code snippet that I have been searching for and can't figure out.
<div id="dont_know">First Name:
<?php print $dont_know['profile_first_name']; ?> </div>
Any help is greatly appreciated. I have tried to figure this thing out for two days and I don't know too much about figuring out which variables to use and which strings to use. Thanks!
Comments
Have you looked at
Have you looked at profile-listing.tpl.php in the Drupal API?
__________________________________________________________________________________
Aweigh - not all who wander are lost.
Thanks kayaker for the fast
Thanks kayaker for the fast response. I have read through that page and even copied the example snippet at the bottom and still no luck! I've tried different variations of strings and so on and nothing works. I've checked and re-checked my profile module to make sure there's no misspellings and made sure there was a value entered in for profile_first_name. I've even check the database tables in phpMyAdmin. If you think you can figure it out let me know. I know a lot of other people have asked the same questions I am and can't seem to get it figured out. Thanks.
The snippet didn't work for
The snippet didn't work for me either. After some wandering about I found the $account variable.
Using this snippet
in your user-profile.tpl.php file will reveal the contents of $account.
Within that content, I found the user-defined profile fields (profile_my_field, etc.) as well as all of the standard profile information.
As usual, I have no idea if this is the Drupalesque way of doing things.
__________________________________________________________________________________
Aweigh - not all who wander are lost.
Thanks for the help. How do
Thanks for the help. How do I go about printing the first name if it's [profile_first_name]? I still can't get it to print. I tried:
and it still will not show the first name! This is a rediculous nightmare. I feel like I'm missing some simple thing. Please bear with me. Thanks.
Nightmares...
Been there, done that, no t-shirt.
$account is an object (note: I'm using $account not $profile).
__________________________________________________________________________________
Aweigh - not all who wander are lost.
Success! Thanks a lot. I've
Success! Thanks a lot. I've been trying to customize the profile pages for a while. It's like I've waken from my horrible nightmare...
$account variable
Is this variable available in page-user.tpl.php file?
I'm trying to insert a google map taking some profile values. Google need to load a javascript on an onload event. I inserted it in page-user but don't work.
Thank's
Ok, it's done.
I inserted this code in user-profile.tpl.php file:
I love you!
I commited the stupidity to update to drupal 6 a site that i made with some heavy profile displaying and i didn't research about it because i'm not exactly an experienced developer (i'm a graphic designer and just getting into this). You just save me some bitternes.
Therefore i thank you so much!
thank you!
this is exactly the info I needed to customize my user profiles!
I tried to use it to print
I tried to use it to print profile_first_name in a block title using block.tpl.php
It doesn't work i dunno why ?
it prints welcome and nothing beside welcome.
Please Help
Thanks
Hi, Have you found a solution
Hi,
Have you found a solution to print the data profile_first_name in a block ?
Thanks
want to achieve the same
want to achieve the same :[
print a profile field into navigation menu