I would like to insert the current user name int the block title.
Any suggestion?

Thanks.

Comments

inders’s picture

just goto

admin=>build=>block

click on add tab on top

like /admin/build/block/add
In Block Body insert code like

<?php

global $user;
 if($user->uid)
      echo "<h2 class='title'>Welcome ".theme("username",$user)."</h2>";
echo 'This is second Body text can be changed';
?>

let the title field blank and place description text for ur block.Dont forget to choose input type as "PHP code"
css and styles can be changed accordingly.

-----
Inder Singh
http://www.Indiapoly.com

Inder Singh
http://indersingh.com

_michel_’s picture

Thanks a lot for your answer.
What about if the block is a menu bloack (no body field)?

Thanks again.