By VanD on
I am looking for a way to alter the profile rendering of a user to exclude having user history displayed.
user-profile.tpl.php looks like this
<div class="profile"<?php print $attributes; ?>>
<?php print render($user_profile); ?>
</div>
Now how can I alter that render (preferably building a custom module to have it not display the history section which is defined here http://api.drupal.org/api/drupal/modules--user--user.module/function/use...
as $page['content']['summary']
How can I make all the normal items display, except for the "summary"?
Comments
.
You may want to take a look to the function hide()
like:
cheers
function
function hook_page_alter(&$page){
$page['content']['system_main']['summary'] = null;
}
.
Just an observation:
The documentation for hook_page_alter states:
So, if we are going for the hook approach, it would be better to use hook_user_view and/or hook_user_view_alter
Cheers!!