I asked this question via support... where do i access or how can i change it so that the first name displays on the member dashboard instead of the username? and was given this code to add to the site.php file - but it causes the page to be blank -------------------------------- Am_Di::getInstance()->blocks->remove('member-identity'); Am_Di::getInstance()->blocks->add(new Am_Block('member/identity', null, 'member-identity-custom', null, function(Am_View $v){ $name = Am_Html::escape($v->di->user->getName()); $url = Am_Di::getInstance()->url('logout'); $url_label = Am_Html::escape(___('Logout')); return <<<CUT <div class="am-user-identity-block"> $name <a href="$url">$url_label</a> </div> CUT; })); ---------------------- need some help with this
The code is correct but it rely on feature that is not exists in current version. So change it to: PHP: Am_Di::getInstance()->blocks->remove('member-identity');Am_Di::getInstance()->blocks->add(new Am_Block('member/identity', null, 'member-identity-custom', null, function(Am_View $v){ $name = Am_Html::escape($v->di->user->getName()); $url = REL_ROOT_URL . '/logout'; $url_label = Am_Html::escape(___('Logout')); return <<<CUT<div class="am-user-identity-block"> $name <a href="$url">$url_label</a></div>CUT; }));
This has all moved on a bit since the original post, so apologies if I am a bit late to the party. If you switch your theme to 'Solid Color' then you get the ability to change this as part of the appearance configuration, giving you access to Name, email or username for the identity block, plus altering the position of it. Pretty sure you'll have discovered that by now, so I'm just posting this here for future reference.
Thanks for this info. Any idea on how to make this work with custom themes? I assume it is just the inclusion of some codes in one of the phtml template files? Thanks!
@everbatim you can find it in template file: application/default/views/blocks/member-identity-std.phtml and do necessary adjustment in your theme.