Skip to content

Question on Header Template #19

@thedead

Description

@thedead

For the user drop down menu on the top right, you have this code:

 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="user_logged_in_name"></a>

and in each page you have some JS to load the header:

   $('.navbar').load('header.php', function() {
        $('#user_logged_in_name').html('<i class="fa fa-user"></i> ' + user['user_name'] + ' <b class="caret"></b>');
        $('.navitem-dashboard').addClass('active');
      });

Why do you not just display the username directly in the header with PHP like this?

 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="active_team_name"><i class="fa fa-users"></i> $loggedinuser->username <b class="caret"></b></a>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions