As I was going through some of the sessions on the QUEST NORTHEAST CONFERENCE I noticed on of the presenters mentioning customizing Test environments Main PeopleSoft CSS PSSTYLEDEF so that the users are always able to distinguish between environments.

The solution that I have employ to solve this problem is to modify the PT_BRANDING:BrandingBase class to dynamically display environment name based on the URL, like this:

captured_Image.png

PT_BRANDING Application package was meant to be used to dynamically customize the look and feel of you application and of course you can do a lot more with this but this is just a very simple example of how easy this can be done.

In order to achieve the above effect all you need is to add code to 2 methods in the class PT_BRANDING:BrandingBase

method GetUniHeaderHTML
method GetUniHeaderHTML_PIA

These methods, as the name suggests are responsible for rendering you Application Portal Header.

/*Iouri Chadour - Added to put Test Environment notification in the header&Request.ContentURI - returns your portal URL in form http://server:port/psp/PSPRC/Left(Right(&Request.ContentURI, 4), 3) - extracts the significant piece to displayon the header*/
&zEnvName = Left(Right(&Request.ContentURI, 4), 3);
&Greeting = &zEnvName | " Environment " | ", UserID:" | %UserId | ", Name: " | %UserDescription;
/* End Mod */

/* This code below is delivered checks for client browser to ensure that Header is displayed correctly */

If &navTheme.isNS4x() Then    &UniHeaderHTMLPIA = GetHTMLText(HTML.PORTAL_UNI_HEADER_NS4X, &Response.GetImageURL(Image.NEW_PS_LOGO), &Response.GetImageURL(Image.NEW_PORTAL_HDR_TBRCRV), " ", " ", &FavoritesHTML, &AddToFavoritesHTML, &HelpHTML, "", &Response.GetImageURL(Image.NEW_PORTAL_HDR_CRV), &Response.GetImageURL(Image.NEW_PORTAL_HDR_BG), &Response.GetImageURL(Image.NEW_PORTAL_HDR_BG), &Response.GetImageURL(Image.NEW_PORTAL_HDR_TBRCRV), &Response.GetImageURL(Image.NEW_PORTAL_HDR_SHD), &Response.GetImageURL(Image.NEW_PORTAL_HDR_TBR), &styleSheet, &homeURL, &startURL, &AddToFavFormHTML, &LogoutURL, MsgGetText(95, 400, "Return Home"), /*20*/MsgGetText(95, 401, "Home"), MsgGetText(95, 402, "Return to Menu"), MsgGetText(95, 403, "Menu"), MsgGetText(95, 408, "Sign out"), &Greeting, &SearchHTML, &ColSpanHTML, &PersonalizeHTML, "", "", &HelpJSHTML, &homepageJS, "", &TabHTML, &WLHTML, &domainScript, &Response.GetJavaScriptURL(HTML.PT_SAVEWARNINGSCRIPT), "", &SaveWarnCrossDomainScript, &Response.GetImageURL(Image.PT_HOME_TAB_ACTIVE_CENTER), &Response.GetImageURL(Image.PT_HOME_TAB_INACTIVE_CENTER), /*40*/&Response.GetImageURL(Image.PT_HOME_TAB_LINE), %Request.ExpireMeta, &CTIHTML, &MCFHTML, &PPMHTML, &Charset);ElseElse    &UniHeaderHTMLPIA = GetHTMLText(HTML.PORTAL_UNI_HEADER_NNS, &Response.GetImageURL(Image.NEW_PS_LOGO), &Response.GetImageURL(Image.NEW_PORTAL_HDR_TBRCRV), "", "", &FavoritesHTML, &AddToFavoritesHTML, &HelpHTML, "", &Response.GetImageURL(Image.NEW_PORTAL_HDR_CRV), &Response.GetImageURL(Image.NEW_PORTAL_HDR_BG), &Response.GetImageURL(Image.NEW_PORTAL_HDR_BG), &Response.GetImageURL(Image.NEW_PORTAL_HDR_TBRCRV), &Response.GetImageURL(Image.NEW_PORTAL_HDR_SHD), &Response.GetImageURL(Image.NEW_PORTAL_HDR_TBR), &styleSheet, &homeURL, &startURL, &AddToFavFormHTML, &LogoutURL, MsgGetText(95, 400, "Return Home"), /*20*/MsgGetText(95, 401, "Home"), MsgGetText(95, 402, "Return to Menu"), MsgGetText(95, 403, "Menu"), MsgGetText(95, 408, "Sign out"), &Greeting, &SearchHTML, &ColSpanHTML, &PersonalizeHTML, "", "", &HelpJSHTML, &homepageJS, MsgGetText(95, 138, "Tool Bar Header"), &TabHTML, &WLHTML, &domainScript, &Response.GetJavaScriptURL(HTML.PT_SAVEWARNINGSCRIPT), "", &SaveWarnCrossDomainScript, &Response.GetImageURL(Image.PT_HOME_TAB_ACTIVE_CENTER), &Response.GetImageURL(Image.PT_HOME_TAB_INACTIVE_CENTER), /*40*/&Response.GetImageURL(Image.PT_HOME_TAB_LINE), %Request.ExpireMeta, &CTIHTML, &MCFHTML, &PPMHTML, &Charset); End-If;
 

Again I would like to post a link to an Oracle Red Book written by Hsing Huang and Maria Gummerson. It outlines how to properly customize your application GUI & Branding. PeopleSoft has special tools that support lots of branding customizations without having to impact the whole application. Here is an excerpt:

“Branding code resides in two different application packages/classes. For standard PeopleSoft Branding, it’s PT_BRANDING:BrandingBase.”

Enjoy and let me know if you have any questions.

http://www.scribd.com/doc/16058292/PeopleSoft-GUI-Tips-Tricks

© 2011 WorkingScripts Suffusion theme by Sayontan Sinha

Switch to our mobile site