Hello,

I'm creating a custom user profile page in which i would like to display the [edit] link to the user when they visit their own profile page on a block, rather than the default main content section. What is the php code to display such a code in the user block?

Thank you.

Comments

akolahi’s picture

alternativly, how do i print the entire content of the profile module (that is outputted on the user's profile page) somewhere else (such as a block instead of the content sections).

Thank you for any help or direction.

akolahi’s picture

I'm trying to following code in my block which seems to make sense but is not working:

<?php 
$id = arg(1); 
$profileuser = user_load($id);
print drupal_render($content_profile_show_profiles[$profileuser->uid]); 
?>

Any ideas?

akolahi’s picture

This did the trick:

<?php
$id = arg(1); 
$profileuser = user_load($id);
print drupal_render(content_profile_show_profiles($profileuser->uid));
?>