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  @Anonymous   @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

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Top Solution Authors
Users online (5,158)