Menu

Adding Button next to "Power-Button"

Nico
2021-09-03
2021-09-06
  • Nico

    Nico - 2021-09-03

    Hi,
    I want to add another Button between the help and power button in the upper right corner.
    I already tried different things but with no success.
    Does anyone know what I should manipulate in an extension to achieve this?
    Many thanks in advance,
    best regards,
    Nico

     
  • Guillaume Lajarige

    Hello Nico,

    Unfortunately there is no native hook to add buttons there, you will have to do it by injecting JS which would create the button. Check iPageUIExtension::GetNorthPaneHtml() API

    Hope this helps,
    Guillaume

     
    • Nico

      Nico - 2021-09-03

      Hi,
      thanks for your fast response.
      I already tried that but somehow I am not able to catch an element with jquery to append or prepend something...
      In "OnDisplayProperties" this is working perfectly.

       
      • Guillaume Lajarige

        But this works only when viewing an object page doesn't it?
        Can you share how you tried with the other API?

         
        • Nico

          Nico - 2021-09-03

          Yes of course, sorry.
          I meant displaying additional infos when showing object details.
          For that i can grab elements using jquery and add just things I want - works great.
          But I did not find something to grab on the upper right menu.

           
        • Nico

          Nico - 2021-09-06

          Hi Guillaume,
          I've found my mistake.
          I tried to add the JS code via a separate file using $oPage->add_linked_script();
          If I inject it directly via $oPage->add_ready_script(); it works as espected.
          Anyway, thanks for the support.
          Best regards,
          Nico

           
        • Guillaume Lajarige

          Great, glad to see you fixed it!

          Cheers,
          Guillaume

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.