This topic is locked
[SOLVED]

 Edit user button/menu?

2/14/2018 11:54:31 PM
ASPRunner.NET General questions
Pete K author

Is it possible to edit the user button / menu that appears in the upper right corner of apps? I have a user profile that includes additional information than what gets pulled in from AD and that would be the perfect place to link to it. Currently in AD mode, it only has one menu item which only applies to admins ("Admin area"). I'd like to add an additional entry for "My profile" and link it to the page I set up for this purpose?
Anyone know if this is possible?

jadachDevClub member 2/15/2018

I think you would have to edit the html of all pages.

<SPAN class="dropdown">

<BUTTON class="btn btn-info dropdown-toggle" aria-expanded="false" aria-haspopup="true" type="button" data-toggle="dropdown">

<SPAN class="glyphicon glyphicon-user">

</SPAN>

{$username}

</BUTTON>

<UL class="dropdown-menu">

{BEGIN logoutbutton}

<LI>

<A href="#" {$logoutlink_attrs}>

Log out

</A>

</LI>

{END logoutbutton}

<LI>

<A href="/profile/list">

Profile

</A>

</LI>

{BEGIN adminarea_link}

<LI>

<A href="admin_rights_list.aspx" {$adminarealink_attrs}>

Admin Area

</A>

</LI>

{END adminarea_link}

</UL>

</SPAN>

{END loggedas_message}

</SPAN>
Pete K author 2/15/2018

Thanks, Jerry. I was thinking something along those lines too, but really don't want to do that for obvious reasons. Hopefully Sergey or someone else knows of a cleaner way. I do appreciate the response.
In the future, that would be a good place to put a menu that could be manipulated through the menu builder.

A
Arkie 2/15/2018

I assume you're using a bootstrap style?? 'cause standard AspRunner styles that I use don't show a button in the upper right.
So... you might want to check some different bootstrap styles and maybe someone else has this same idea.

admin 2/16/2018

Here is the code you need to add to JavascriptOnLoad event on the List page:

$("ul[class=dropdown-menu]").append("<LI><A href='http://cnn.com'>CNN</A></LI>";);


The problem is that you need to add this code to every List page which is probably not convenient either.

Pete K author 2/16/2018

Thanks, Sergey. I'm going to mark this as solved since you have provided a solution, but as you say having to insert the code on every page makes it an unattractive option. Maybe in the future you could provide a way to manipulate this globally. For now, I've decided to just add a Profile item to my standard menu.