Branding Header Links

One thing with the delivered PeopleSoft branding is that the links in the universal navigation header aren't particularly useful to the average user. Specifically, the Multichannel Console and Add to Favorites links.

universal-nav-header-delivered.png

What might be more useful here are links to the process monitor and report manager. This article explains how to change these links so you see this instead:

universal-nav-header-customised.png

Branding Application Package

This article involves changing the delivered PT_BRANDING application package. If you want to avoid customising the delivered application package, you can, clone it, and then change the PeopleTools options to use your cloned version. Simply open the delivered PT_BRANDING application package in application designer. Choose Save As and give it a new name. Then navigate to: PeopleTools > Utilities > Administration > PeopleTools Options and change the branding application package to whatever your clone is called and save it.

change-branding-app-package.png

Header Methods and Instance Variables

Open the IframeHeader application class and add the following methods:

  • method GetProcessMonitorHTML() Returns string;
  • method GetReportManagerHTML() Returns string;
  • method SetProcessMonitorHTML();
  • method SetReportManagerHTML();

Also add the private instance variables:

  • instance string &strProcessMonitorHTML;
  • instance string &strReportManagerHTML;

Header Method Code

Here's the code for each of the methods. Note this really just replicates the code already in the class (use GetWLHTML() and SetWL() as examples).

GetProcessMonitorHTML

method GetProcessMonitorHTML
   /+ Returns String +/;
   Return &strProcessMonitorHTML;
end-method;

SetProcessMonitorHTML

method SetProcessMonitorHTML
 
   Local ApiObject &cref = &Portal.FindCRefByName("PT_PROCESSMONITOR_GBL");
   If All(&cref) And
         &cref.Authorized And
         &cref.IsVisible Then
      &strProcessMonitorHTML = %This.setLinkHTML("", "pthdr2wl", &cref.RelativeURL, "Process Monitor");
   End-If;
 
end-method;

GetReportManagerHTML

method GetReportManagerHTML
   /+ Returns String +/;
   Return &strReportManagerHTML;
end-method;

SetReportManagerHTML

method SetReportManagerHTML
 
   Local ApiObject &cref = &Portal.FindCRefByName("PT_CONTENT_LIST_GBL");
   If All(&cref) And
         &cref.Authorized And
         &cref.IsVisible Then
      &strReportManagerHTML = %This.setLinkHTML("", "pthdr2wl", &cref.RelativeURL, "Report Manager");
   End-If;
 
end-method;

Note that the Set methods check whether or not the user is authorized to access the content reference to the process monitor/report manager and whether or not it is visible. So it will only display these links on the header if the user has access to the process monitor and report manager.

Branding Base

After making the relevant changes to the IframeHeader class, switch over to the BrandingBase class and find the method getIframeHeaderHTML.

In this method, you'll want to comment out the code that displays the Multi-Channel Framework link and replace it with the Process Monitor link. Similarly you'll want to comment out the code that displays the Add to Favorites link and replace it with the Report Manager link. As noted in the comments, you do not have to comment out these delivered links if you don't want to, just add the code that displays the process monitor and report manager links.

Replace Multi-Channel Console with Process Monitor Link

Find the following lines and comment them out.

REM Display the Multi-Channel Framework link if the user has access;
   &hdrLink.SetCTIMCFHTML();
   &mcfLink = &hdrLink.GetMCFHTML();
   If All(&mcfLink) Then
      &mcfJS = &hdrLink.GetMCFJScriptHTML();
   End-If;
   &hdrLinkHTML = %This.setIframeHdrLinkHTML(&hdrLinkHTML, &mcfLink, &sepHTML);

Below that, add the following to show the process monitor link:

REM Display Process Monitor link if user has access;
   Local string &pmLink;
   &hdrLink.SetProcessMonitorHTML();
   &pmLink = &hdrLink.GetProcessMonitorHTML();
   &hdrLinkHTML = %This.setIframeHdrLinkHTML(&hdrLinkHTML, &pmLink, &sepHTML);

Make sure you add appropriate comments around this change.

Replace Add to Favorites with Report Manager Link

Similarly, find the following lines and comment them out:

REM Add to Favorites;
   &hdrLink.SetAddFav();
   &addToFavLink = &hdrLink.GetAddToFavoritesHTML();

Below that, add the following to show the report manager link:

REM Display Report Manager link if user has access;
   Local string &rmLink;
   &hdrLink.SetReportManagerHTML();
   &rmLink = &hdrLink.GetReportManagerHTML();
   &hdrLinkHTML = %This.setIframeHdrLinkHTML(&hdrLinkHTML, &rmLink, &sepHTML);

Make sure you add appropriate comments around this change.

Cloned Branding Application Package

If you cloned the PT_BRANDING application package instead of customising it, you'll need to make two more changes in the BrandingBase class.

  • First, change the import from import PT_BRANDING:IframeHeader to import YOUR_BRANDING::IframeHeader at the top of the code.
  • Second, change the declaration of the &hdrLink object so instead of using create PT_BRANDING:IframeHeader(…) it uses create YOUR_BRANDING:IframeHeader(…).

You might notice that your clone isn't independent. A lot of the class actually reference back to the delivered PT_BRANDING and related application packages. This is fine, if a patch ever changes these application packages they will still apply but you won't lose your specific customisations.

Testing it out

Log out and log back in. You should see your new links in the header. If not, you might need to clear your browser cache and perhaps your web server cache. Test that the new links take you to the pages you expect. If you don't see a link it may be due to security. Do you have access to the process monitor or report manager? If you don't you won't see the respective link.

Comments

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License