cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mnd
Frequent Visitor

display the name of the partner company in the header

Hello ,

 

In power apps portal, I would like to display the name of the partner company in the header of the menu after login. Is it possible to do this? and then move some of the menu items to the left of the logo.

 

Thank you in advance for your help.

 

@ragavanrajan  @Manar   @OliverRodrigues @chleverenz @mobicycle 

 

1 ACCEPTED SOLUTION

Accepted Solutions
chleverenz
Super User
Super User

Hi @mnd ,

the menu is rendered in standrd via the "header" webtemplate of your site. I would recommend to copy that template to a new one (may be "my header" 🙂 ) and edit the tremplate to your needs. 

You need a little bit html know-how to do so, bit it will work.

in order to get the current compannyname, you could use the user object in liquid, which holds all attributes of the currently logged in user ( https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#user  ). I assume, that parentcustomerid will be the link to the company you like. You could either take the name property from that attribute or even get other attributes via the entites object in liquid ( https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#entities  ).

Hopefully, this already points in the right direction.

 

Have fun,

  Christian

View solution in original post

4 REPLIES 4
chleverenz
Super User
Super User

Hi @mnd ,

the menu is rendered in standrd via the "header" webtemplate of your site. I would recommend to copy that template to a new one (may be "my header" 🙂 ) and edit the tremplate to your needs. 

You need a little bit html know-how to do so, bit it will work.

in order to get the current compannyname, you could use the user object in liquid, which holds all attributes of the currently logged in user ( https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#user  ). I assume, that parentcustomerid will be the link to the company you like. You could either take the name property from that attribute or even get other attributes via the entites object in liquid ( https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#entities  ).

Hopefully, this already points in the right direction.

 

Have fun,

  Christian

Anonymous
Not applicable

Hi @chleverenz ,

 

Thank you for your help. Now I can display the name of the company.
But for the moment I can't move the menu to the left.

 

Thanks

mnd
Frequent Visitor

Hi @chleverenz ,

 

Thank you for your help. Now I can display the name of the company.
But for the moment I can't move the menu to the left.

 

Thanks

chleverenz
Super User
Super User

Hi @mnd ,

glad it helped already and thanks for the solutionvoting.

my headertemplate contains sth like : 

<div id="navbar" class="navbar-collapse collapse">
      {% assign primary_nav = weblinks["Primary Navigation"] %}
if you move the whole div do another place in your html it should work.
The idea of portals at that point is to use the weblinkset "Primary navigation" in order to render the menu.
So, if you want only part of the menue on the left side, you might want to add either gardcoded links (which i would not recommend) or just invent another weblinkset (may be "Left Primary Navigation") which then contains stuff which should go to the left 🙂
 
One additional comment: the header is heavily cached by the portal. So, putting too dynamic stuff in there might not work. Or you switch off the headercaching by a sitesetting (which of course slows down your portals)
 
Have fun,
  Christian

Helpful resources

Announcements
Welcome Super Users.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,979)