By carlthuringer on
Hello,
I'm having trouble building a custom user theme page that lists a user's recent blogs with snippets.
I have a views page set up and ready for a user name argument, but I cannot get a username variable for the current profile page no matter what I try.
<div class="profile">
<?php print $user_profile; ?>
<?php print views_embed_view('viewBlogs', 'Page', $user->name ); ?>
<?php echo "Name: $user->name<br>"; ?>
</div>
This code displays the current user's username, but not the profile's username. I can't seem to find any documentation on Profile variables and I'm afraid I'm going to have to use a substring search method to extract the username from the meager $profile array's fields.
Any suggestions welcome.
Comments
You can add
You can add
to see all the available fields.
Thanks, but this doesn't
Thanks, but this doesn't show the fields avaliable to the profile page.
I need to get the username of the PROFILE being displayed, not the currently logged-in user.
A change from Drupal 5, the
A change from Drupal 5, the default file says to do
to see all the available unformatted data.
Yes, I've done that too, but
Yes, I've done that too, but it only appears to have two items in the array. Neither of them is the username of the profile, it's mostly a bunch of HTML code.
try $account
i.e. $account->name
-the doctor
http://www.doctorflix.com