-
AuthorPosts
-
bobgen Friend
bobgen
- Join date:
- January 2006
- Posts:
- 50
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 8
- Thanked:
- 1 times in 1 posts
February 5, 2011 at 2:04 pm #159790How is possible to put logged user name on screen in line of menu? Example is in attached image.
Thanks.
Khanh Le Moderator
Khanh Le
- Join date:
- November 2013
- Posts:
- 1884
- Downloads:
- 41
- Uploads:
- 31
- Thanks:
- 44
- Thanked:
- 203 times in 131 posts
February 9, 2011 at 8:43 am #375815You can override the block mainnav (templates/ja_purity_ii/layouts/blocks/mainnav.php) to put logged in username. Eg:
[php]
<div id=”ja-mainnav” class=”wrap”>
<div class=”main clearfix”>
<?php if (($jamenu = $this->loadMenu())) $jamenu->genMenu ($this->getParam(‘startlevel’,0), $this->getParam(‘endlevel’,-1)); ?>
</div>
</div><?php if ($this->hasSubmenu() && ($jamenu = $this->loadMenu())) : ?>
<div id=”ja-subnav” class=”wrap”>
<div class=”main clearfix”>
<?php $jamenu->genMenu (1); ?><?php
//Username if logged in
$user =& JFactory::getUser();
if (!$user->get(‘guest’)) : ?>
<div class=”loggeduser”>Hello <?php echo $user->get(‘username’) ?></div>
<?php endif;
//End for add logged user
?>
</div>
</div>
<?php endif;?><ul class=”no-display”>
<li><a href=”<?php echo $this->getCurrentURL();?>#ja-content” title=”<?php echo JText::_(“Skip to content”);?>”><?php echo JText::_(“Skip to content”);?></a></li>
</ul>[/php]
1 user says Thank You to Khanh Le for this useful post
AuthorPostsViewing 2 posts - 1 through 2 (of 2 total)This topic contains 2 replies, has 2 voices, and was last updated by
Khanh Le 13 years, 12 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Put logged user name on screen
Viewing 2 posts - 1 through 2 (of 2 total)
