Article ID: 112375, created on Sep 23, 2011, last review on Nov 7, 2014

  • Applies to:
  • Business Automation

Resolution

External link could be added to PBA-E CCP by means of the PBA-E UI customization. See the example solution below:

  1. Create a new internal page in the /usr/local/bm/conf/wnd/BM/ directory:`

    # cat TestPage.xml
    <window defs="BM" type="dialog" id="TestPage">
      <layout>
        <grid id="dataMisc">
          <row id="headJS"><cell>
            <html>
            <script type="text/javascript">
            </script>
            </html>
          </cell></row>
          <row id="mainJS">
            <cell>
                    <html>
            <script type="text/javascript">
            function get(actionURL, bNewWindow) {
              var form = document.createElement("form");
              if (null != actionURL) form.action = actionURL;
              else form.action = self.location;
              form.method = "get";
              if (bNewWindow != 0) form.target = "_blank";
              document.body.appendChild(form);
              form.submit();
              return false;
            }
    
    
      function redirect() {
          get('http://example.com', 0);
          return false;
        }
        redirect();
        &lt;/script&gt;
        &lt;/html&gt;
      &lt;/cell&gt;&lt;/row&gt;
    
    &lt;row id="showText"&gt;
        &lt;cell&gt;
          &lt;html&gt;
          &lt;h4&gt;
              Redirecting...
          &lt;/h4&gt;
          &lt;br&gt;
          &lt;/html&gt;
       &lt;/cell&gt;
      &lt;/row&gt;
    &lt;/grid&gt;
    
    </layout> </window>

    In the above example 'http://example.com' is supposed to be the target URL.

  2. Apply customization to the MainTree.xml file:

    • Check if there is MainTree.xml file in the customization directory (for example, ~bm/conf/wnd/BM/customization/customization/ or ~bm/customization/ if there is a symlink created), if not, create it and put the following content in it:

      For PBA-E 5.4 and earlier

      <window id="MainTree">
         <elements>
          <tree>
       <branch id="end_customer_dashboard" label="Billing Manager" icon="nav/tree/BillingManager/0-BillingManager-16.gif">
       <leaf id="external_page" label="Google" icon="nav/tree/OperationDirector/AccountManager/Customers-16.gif"/>
       </branch>
          </tree>
         </elements>
         <actions>
          <ref id="external_page">
             <call type="window" callee=BM::TestPage()/> <!-- x1 -->
           </ref>
         </actions>
       </window>
      

      For PBA-E 5.5 and later

      <window id="MainTree">
       <elements>
        <tree>
         <item id="external_redirect" label="Google" />
        </tree>
       </elements>
       <actions>
        <ref id="external_redirect">
         <call type="window" callee=BM::TestPage()/>
        </ref>
       </actions>
      </window>
      

    if the file exists, just add the leaf to necessary branch and add ref with call to actions.

    • Restart www container:/etc/init.d/pba restart www
    • Log out and again log in to the billing part of the Customer Control Panel and check the new menu item which is present under "Billing Manager" menu in the Control Panel.

Search Words

external link

customization

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF