Showing posts with label Custom Logo. Show all posts
Showing posts with label Custom Logo. Show all posts

Saturday, June 24, 2017

PeopleTools 8.55+ Branding: Using the Logo as a Hyperlink

It is a common practice in most social media and big brand websites to use the webpage logo as a hyperlink for navigation. This usually provides a mechanism for the users to 'return to home' in most cases. Here is a very interesting discussion on how this standard/convention originated:
https://ux.stackexchange.com/questions/81727/why-is-it-standard-for-a-website-logo-to-navigate-to-the-home-page

In the past, I have worked on requirements where we wanted the logo of a PeopleSoft application to hyperlink to the enterprise portal (which may or may not be PeopleSoft based). To generalize this requirement, let us assume that we want to hyperlink the PeopleSoft Logo to a configured URL (which could be any URL of our choice).

This post assumes that:
My environment details:
- CS 9.2 PUM Image 4
- PeopleTools 8.55.12

Adding a Hyperlink to the Logo on the Fluid Homepage:

The first step we need to do is to identify the HTML elements (divs, images, etc.) that are involved in generating the logo. It is very easy to identify this using the browser's developer tools (inspect element option).



As we can see, the logo image is added to the div (with the style class nuihdr_logo) as a pseudo-element using CSS. Here is a javascript object that selects this div (using the class selector) and adds a click event which redirects to a URL defined in a URL definition (CSK_LOGO_URL). This works well because the div element is completely enclosed within the image (psuedo-element) in terms of position on the webpage and as a result does not have any overflow issues. We will see how this can be an issue as we extent this functionality to the Classic Homepage (next section).

JavaScript Object: CSK_LOGO_URL_JS


I used the javascript injection framework to load this javascript object.


URL Definition Configuration:


Results:

Here is a demo of the Fluid Homepage Logo hyperlink.


Adding a Hyperlink to the Logo on the Classic Homepage:

In this section, we will extent the functionality discussed above to the logo on the Classic Homepage. Let us use the same approach and try to identify the HTML elements (divs, images, etc.) that are involved in generating the logo.



As we can see, the div element (with id pthdr2logofluid) spans the entire width of the page whereas the logo image which is added as a pseudo-element using css obviously does not. So, if we were to use the previous approach and add a click event function for this div (id pthdr2logofluid), then the entire div (which spans the width of the page) would become a hyperlink.

It is not very easy to selectively fire the click event function only on the pseudo element because pseudo elements are not part of the DOM and therefore cannot be manipulated using javascript. After a long search where I almost gave up, I found the following discussion where there was a solution for a similar requirement.

Refer: https://stackoverflow.com/questions/7478336/only-detect-click-event-on-pseudo-element
JSFiddle: http://jsfiddle.net/ZWw3Z/70/

We can take this idea and apply it to the Classic Homepage Logo by updating the javascript as follows:

Updated JavaScript Object: CSK_LOGO_URL_JS


The updated javascript code selects the div element (with id pthdr2logofluid) and sets all pointer-events to none using css. The javascript also has the click event function to redirect users to the URL configured in the URL definition (CSK_LOGO_URL).

Finally, the Classic stylesheet (CSK_BRAND_CLASSIC_TEMPLTE_FL) which is part of the Branding Theme in my environment which uses Theme Macro Set (click here for more details), was updated to set the cursor and pointer-events properties for the pseudo-element.


Results:

Here is a demo of the Classic Homepage Logo hyperlink.


Saturday, March 5, 2016

PeopleTools 8.55.x - Branding - Part I - What has changed?

PeopleTools 8.55 release packs a punch when it comes to new features. There are also some notable improvements to Branding in PeopleTools 8.55 building on the Branding framework that was previously delivered as part of PeopleTools 8.54.

In this post, I will cover some of my key findings at a high level and follow up with an additional article on some 'how-to' guides for common Branding tasks.

Note: This post assumes that the branding is applied to a stand-alone PeopleSoft application without the use of PeopleSoft Interaction Hub. There is a new Branding Activity Guide in PeopleSoft Interaction Hub Image 2 which provides a guided step-by-step process for customers to perform simple or advanced branding tasks and to publish the Branding Theme to other PeopleSoft applications in the cluster. Please refer to this Oracle blog post which highlights the latest Interaction Hub features and provides additional resources.

Unified Header:

This certainly deserves a mention because there may be some misconception that starting from 8.55 users are forced to use Fluid. The point to clarify and understand is that the only thing changing is the Branding header and the navigation mechanism. In 8.55, we now have the same header (hence the term unified) for both Classic and Fluid. With that, there is a shift in user navigation as well. That is, we would need to use the NavBar, Fluid Homepages, Dashboards, etc. to navigate around the application instead of using the traditional drop-down menu/breadcrumb navigation for Classic.

Matthew Haavisto from Oracle has detailed this in his blog entry with some references and how-to steps for those who might still want to use the Classic navigation.

Note: I updated the title of this section from 'Unified Header and Navigation' to just 'Unified Header'. I realize that 'Unified Navigation' is not a term to be used loosely as it may have a different meaning depending on whether we are using PeopleSoft Interaction Hub or not. Please refer to another blog post (again authored by Matthew Haavisto) which level sets these concepts.

Global Javascript Injection:

I previously wrote about the issue with custom javascript injection in Fluid pages. The same challenge still persists in 8.55. This means that any custom javascripts added to the Branding System Options does not work on the Fluid pages but it does on the Classic pages.

E.g.:

NavBar > Navigator > PeopleTools > Portal > Branding > Branding System Options


The test javascript CSK_TEST_JS contains a simple alert message.

NavBar > Navigator > PeopleTools > Portal > Branding > Branding Objects


Results in Classic: The javascript gets injected and the alert message is displayed.


Results in Fluid: The javascript does not get injected and the alert message is not displayed.


Workaround: We can still use the same workaround that I previously described here.

Global Style Sheet Injection:

The same issue exists for global style sheet injection using the Branding System Objects. But there is a delivered alternative to include custom styles to Fluid which I detailed in my previous post.

Theme Macro Sets for overriding Branding Elements:

I am saving the best for the last! This is definitely a great addition to the framework and I believe that it can only get better with future releases. In 8.55, we can now override some of the common Fluid Branding elements such as images, icons and styles with just configuration (macro sets). I previously detailed the complexity of overriding Fluid Branding elements in 8.54 (Part 5A and Part 5C).

PeopleBooks Reference: Defining Macro Sets and Macros

I will show you a teaser on how we can use the Theme Macro Sets to override the unified header (classic/fluid) branding logo image.

Before that we must start of with some housekeeping tasks to assemble a custom theme with custom homepage header, classic - theme style sheet and fluid - global override style sheet definitions. This would enable us to not only override the logo image but also to override subsequent Branding elements.

Step 1: Create Custom - Classic - Theme Style Sheet Definition

Note: We only need to perform this step if we intend to override some of the delivered styles for Classic while using Theme Macro Sets.

Clone delivered style sheet: PT_BRAND_CLASSIC_TEMPLTE_FLUID

Copy the entire contents on the freeform tab of the delivered style sheet (PT_BRAND_CLASSIC_TEMPLTE_FLUID) using App Designer.


Paste it as the contents of a custom style sheet object - CSK_BRAND_CLASSIC_TEMPLTE_FLUID.

NavBar > Navigator > PeopleTools > Portal > Branding > Branding Objects


Step 2: Create Custom - Fluid - Global Override Style Sheet Definition

Note: We only need to perform this step if we intend to override some of the delivered styles for Fluid while using Theme Macro Sets.

Clone delivered style sheet: PT_BRAND_FLUID_TEMPLATE

Copy the entire contents on the freeform tab of the delivered style sheet (PT_BRAND_FLUID_TEMPLATE) using App Designer.


Paste it as the contents of a custom style sheet object - CSK_BRAND_FLUID_TEMPLATE.

NavBar > Navigator > PeopleTools > Portal > Branding > Branding Objects


Step 3: Create Custom - Homepage Header:

NavBar > Navigator > PeopleTools > Portal > Branding > Define Header and Footers

Search for header definition DEFAULT_HEADER_FLUID and 'Save As' CSK_HEADER_FLUID (custom header).



Step 4: Create Custom - Theme Macro Set:

NavBar > Navigator > PeopleTools > Portal > Branding > Theme Macro Set

Copy the delivered Macro Set (PT_DEFAULT_MACROSET_855) and save as CSK_DEFAULT_MACROSET_855.


Enter custom Macro Set name (CSK_DEFAULT_MACROSET_855) and Save.



Step 5: Assemble Custom Theme

NavBar > Navigator > PeopleTools > Portal > Branding > Assemble Themes

Search for theme definition DEFAULT_THEME_FLUID and 'Save As' CSK_THEME_FLUID (custom theme).


Update the custom theme CSK_THEME_FLUID with the custom definitions created in the preceding steps.

Note: If you did not clone PT_BRAND_CLASSIC_TEMPLTE_FLUID and PT_BRAND_FLUID_TEMPLATE in steps 1 and 2 respectively, then you can just use the delivered styles for Classic - Theme Style Sheet and Fluid Components - Global Override Style Sheet.


Note: The following settings are mandatory for using Theme Macro Set. I did not find these mentioned anywhere in the documentation.
  1. Homepage Header: Must be derived (cloned) from DEFAULT_HEADER_FLUID.
  2. Classic - Theme Style Sheet: Must be derived (cloned) from PT_BRAND_CLASSIC_TEMPLTE_FLUID.
  3. Fluid - Global Override Style Sheet: Must be derived (cloned) from PT_BRAND_FLUID_TEMPLATE or PT_BRAND_FLUID_NOIMG_TEMPLATE.
These are the reasons why we completed steps 1-3. I believe the above requirements for Theme Macro Set are to be released shortly as part of a more detailed Branding guidelines document.

Step 6: Update Branding System Options

Update Branding System Options to reference the custom theme CSK_THEME_FLUID (created in the previous step).


We have completed all the housekeeping tasks to assemble a custom theme in the Branding framework. Now, we can start using the Theme Macro Sets to override Branding elements.

Step 7: Override Logo (or other available Branding elements) using Theme Macro Sets

NavBar > Navigator > PeopleTools > Portal > Branding > Theme Macro Set

Click on the custom Theme Macro Set to override the available Branding elements (177 elements - images, icons and styles - are available as delivered).



Since we want to override the logo, let us find the Branding elements (macro names) that represent the logo and override the macro content to use a custom image.




Note: I used a custom logo which is a SVG image with a height of 32 pixels. You may need to adjust other styles if your image height varies. I tried to match the height of the delivered image for the sake of this proof of concept.

NavBar > Navigator > PeopleTools > Portal > Branding > Branding Objects


Results in Fluid:


Results in Classic:


Now we can see the results of using a macro to override the logo image. But if you look at the screenshots closely, the logo is a little displaced. Let us fix that by adjusting the style (top padding).

Macro Name: PT_LOGO_TOP_PADDING
- Adjust top padding from 0.25em to 0.00em


Results in Fluid:


Results in Classic:

While the difference is subtle, you might notice that the Fluid logo appears to be positioned as expected (padding-top: 0.00em;) but the Classic logo is still displaced.

When I looked into it further, I figured that the classic homepage logo styling is getting generated a little differently and does not honor the macro override (PT_LOGO_TOP_PADDING) we just updated.


Since we already did all the housekeeping work, it is very easy to override this style using the custom Classic - Theme Style Sheet (CSK_BRAND_CLASSIC_TEMPL_FLUID).

NavBar > Navigator > PeopleTools > Portal > Branding > Branding Objects

Edit CSK_BRAND_CLASSIC_TEMPL_FLUID and set top to 4px for .homePageHdr #pthdr2logofluid:before selector.


Results:


Hope this gives you an understanding of what is new with Branding in PeopleTools 8.55. In the next post, I will provide guidelines on how to perform some more detailed branding tasks. Stay tuned!

Notes:
  1. Details of the environment used for this post: HCM 9.2 - PUM Image 16 - PeopleTools 8.55.01.
  2. If you find any inconsistent results while going through any of the steps detailed in this post (especially while assembling the theme) then please make sure you bounce your web and app servers and purge the cache.

Sunday, November 29, 2015

PeopleTools 8.54+ - Branding - Part 5C - Fluid Branding (Continued)

This is a continuation of my previous posts on PeopleTools Fluid Branding: Part 5A and Part 5B.

Using jQuery to override Fluid Branding Images and Icons:

Those who read my previous post (Part 5A) would realize that in order to override the delivered images and icons on the Fluid Branding we ended up customizing some of the Fluid pages and subpages. We did that because all those images and icons were referenced directly on the page field properties of the Fluid header/footer.

The question is whether we can use CSS, javascript or a combination of both to override these images and icons? The answer is yes but I would continue to ask the question if the juice is worth the squeeze? Do we really need all this additional client side code/overrides just to avoid a handful of customizations to page field properties? I will let you make that determination depending on your circumstances and environment.

In this section I will try to provide an alternative option using jQuery to avoid making customizations for image/icon overrides. You could also achieve the same using pure CSS, javascript or both but I find the jQuery library quite useful for such DOM manipulation.

As an example for the purpose of this section, I reverted the change I made previously to override the Fluid home logo image. Now the page field property is as delivered and we can see the Oracle logo on the Fluid homepage when we login.

App Designer > File > Open > Page > Select: PTNUI_LP_HEADER



In my previous post (Part 5B), I detailed how I created a online configuration framework to inject javascripts into Fluid UI. I used this framework to inject jQuery (PT_JQUERY_1_6_2_JS) and my custom javascript object (CSK_FL_IR_JS) for image replacement.


Now let us take a look at the javascript object CSK_FL_IR_JS.


In this javascript, I called an IScript that would resolve the suitable URL on the web server (cache directory) for the custom image object CSK_LOGO_SVG and store it in a javascript variable called 'cskLogo' (refer Part 5B for more details). Then I used jQuery to set/override the 'src' attribute for the image element with id 'PTNUI_LP_HEADER_PTNUI_LOGO'.

JavaScript for reference:

// Get Image URL for CSK_LOGO;
document.write(unescape("%3Cscript src='/psc/" + site + "/EMPLOYEE/EMPL/s/WEBLIB_FL_CSK.ISCRIPT1.FieldFormula.IScript_Set_Image_URL_Variable?var=cskLogo&img=CSK_LOGO_SVG' type='text/javascript'%3E%3C/script%3E"));

var $jq = jQuery.noConflict();
$jq(document).ready(function(){

  $jq('#PTNUI_LP_HEADER_PTNUI_LOGO img').attr('src', cskLogo);

});


Now we can test the changes and see how we could simply override the source attribute of an image using jQuery to avoid customizations to page field properties.


Creating an environment specific header for Non-Production databases:

This section is intended to help us avoid what I like to call "testing in production"! I am sure we have all worked in IT long enough to realize that accidents happen. I have seen many cases where we end up making changes in the production environment without realizing we are in production (causing all sorts of issues). This typically happens when we have end users and/or testers working on multiple environments across multiple browser windows. Traditionally, most organizations (with PeopleSoft applications) tend to add some visual cues (such as writing the database name on the header) to indicate/differentiate the fact that the user is currently logged in to a test environment.

In Classic UI, we had plenty of real estate in the branding header to add the database name. In Fluid UI, since we might not have enough wiggle room in the delivered header we will need to be a bit more creative. My approach to this requirement for Fluid is to add an additional custom header (that can be hidden - in cases were we want to take screenshots for job aids, etc.). While it does take up a small portion of the real estate, this was the least intrusive method that I could think of (without affecting existing functionality around the Fluid branding header).

Step 1: Create custom javascript object


This custom javascript object uses the jQuery library to add (using 'prepend' method) a custom div to the beginning of the delivered header element with id='PT_HEADER'.


Custom div structure:
div (id = cskdbnamecontainer)
- Text with database name (id = cskdbname)
- 'Hide' link to remove the header if required (id = cskdbnamehide)

Additionally, the javascript object (CSK_FL_DBNAME) also contains code to remove the custom div (cskdbnamecontainer) when we click on the 'Hide' link.

Javascript for reference:

// Display Database Name using jQuery once the document is ready;

var $jq1 = jQuery.noConflict();

$jq1(document).ready(function(){

   // Add div to display DB Name;
   $jq1( "#PT_HEADER" ).prepend( "<div id='cskdbnamecontainer' align='center'><span id='cskdbname'>Test Environment: %dbname</span><a href='#' id='cskdbnamehide'>Hide</a></div>" );

   // Add jQuery to hide the DB Name when the 'Hide' link is clicked;
   $jq1("#cskdbnamehide").click(function(){
         $jq1("#cskdbnamecontainer").hide();
   });

});


Step 2: Inject custom styles

In part 5A, we saw how we could inject custom styles into Fluid UI. Now let us add some additional custom styles to CSK_FLUID_CSS style sheet object so that it gets injected at runtime.

Note: If you are performing these steps in PT 8.55, then instead of using CSK_FLUID_CSS, you will need to make the changes to CSK_BRAND_FLUID_TEMPLATE (Click here for more details).


Custom styles for reference:

/* Fluid - Display DBName for non-Prod environments */
#cskdbnamecontainer {
   height: 26px;  
   background-color: rgb(204,204,204);
}
#cskdbname {
   color: rgba(229,47,0,1);
   line-height: 26px;
   font-weight: bold;
   padding-right: 10px;
}


Step 3: Inject custom javascript CSK_FL_DBNAME into Fluid UI

Let us inject this javascript for all non production databases (we don't want to display this in production).


Javascript injection snippet for reference:

// CSK Add Custom Environment Header;
if ("%dbname" !== "PROD_DBNAME") {

  document.write(unescape("%3Cscript src='/psc/" + site + "/EMPLOYEE/EMPL/s/WEBLIB_PTBR.ISCRIPT1.FieldFormula.IScript_GET_JS?ID=CSK_FL_DBNAME' type='text/javascript'%3E%3C/script%3E"));

}


Now we are ready to test this change.




If we click on the 'Hide' link on the custom header, then the entire div gets removed as shown below.



Adding Custom Links to Fluid Branding:

In my previous posts (Part 3 and Part 4B), we saw how we could add custom links to the Classic Branding Header. In this section, I will detail how we can add custom links to the Fluid Branding. Fluid Header as such has very limited real estate (unlike Classic), so we need to find the appropriate location to add the custom links without adversely affecting any of the delivered functionality. The best way to add custom links (with minimal impact) would be as additional list items on the "Action Menu" aka the "Hamburger" icon.



Let us say, we want to add a custom link to an external website which should be available on all Fluid Pages (including the Landing Page).

How do we add a custom link to the Fluid "Action Menu"? First, we need to figure out how the Action Menu is getting generated. If we open PT_HEADER_ACTION page in Application Designer then we can see that all delivered links are list on this page. We can also see that each delivered link is wrapped in a group box and contains specific styling. The links on the PT_HEADER_ACTION page are additionally controlled via JavaScript, CSS media queries and/or PeopleCode to display/hide links according to the device form factor. In our case, we want our custom link to always appear on all pages regardless of device form factor.


Notice there is a small area right at the top of the page which contains a "Custom Action" group box? It appears that Oracle has already anticipated the need for custom Action Menu links and provided a placeholder group box. Let us see how we can add our custom link(s) into this group box.

Step 1: Create Custom Subpage

Instead of directly adding our custom links to the PT_HEADER_ACTION page, let us create a custom subpage so that it acts as a container for all the custom links on the Fluid Branding.

The custom subpage (CSK_HEADER_ACTION) contains just two fields (one groupbox for styling and one hyperlink which is the custom link).



Page Field Properties for Group Box "CSK Home":

Add 'Default Style Name' as ps_menuitem.


Page Field Properties for Hyperlink "CSK Home":

Set the Hyperlink Destination to 'PeopleCode Command' so we can control the OnClick event using the FieldChange PeopleCode.


Always better to use a Message Catalog entry for Labels.


Step 2: Write Custom PeopleCode for the Custom Link FieldChange Event


PeopleCode for Reference:

Local string &redirectURL;

&redirectURL = GetURL(URL.CSK_FLU_HOME_ACTION_ITEM);

%Response.RedirectURL(&redirectURL);


URL Definition for Reference:


Updated on 04/26/2018

Please refer the below blog post for updated code/logic.
https://pe0ples0ft.blogspot.com/2018/04/adding-custom-links-to-action-menu.html

Step 3: Add Custom Subpage to PT_HEADER_ACTION

This section updated on August 26, 2017:

Gaurav Rajput reported an issue with Custom Action List items which made me realize that adding our custom subpage inside the 'Custom Action' groupbox was interfering with other custom (page level) action items that are included at a transaction level (click here for more details). To fix the reported issue, I moved the custom subpage outside the 'Custom Action' groupbox as follows (regardless of PeopleTools version this is a better approach moving forward):


Order of the custom subpage should also be above the 'Custom Actions' groupbox:


We are now ready to test these changes.




Note: The above steps detail how we can add custom links to Fluid universally across the application (for all pages). If you want to add custom links to a specific page (custom or delivered) only, then you can follow the approach used on PT_LANDINGPAGE (delivered page) to add the 'Personalize' link.


Considering Small Form Factor Logo for Fluid Branding:

If you used the approach detailed in Part 5A for overriding the Fluid Homepage Logo then you might have noticed that the logo for small form factor (SFF) devices revert back to another delivered image (PTNUI_ORACLE_LOGO_SFF).


This delivered image is generated by some runtime PageActivate PeopleCode.


We have two options to override this small form factor image.

Option 1: This applies for anyone currently using the customization approach detailed in Part 5A. We can simply customize PT_LANDINGPAGE.Activate (Page PeopleCode) to use our custom SFF image instead of the delivered as follows:


Option 2: Alternatively, if we use the jQuery image replacement technique detailed above then we can improvise the javascript to appropriately replace the logo depending on the form factor.

 Update CSK_FL_IR_JS as follows:


Updated javascript for reference:

// Get Image URL for CSK_LOGO;
document.write(unescape("%3Cscript src='/psc/" + site + "/EMPLOYEE/EMPL/s/WEBLIB_FL_CSK.ISCRIPT1.FieldFormula.IScript_Set_Image_URL_Variable?var=cskLogo&img=CSK_LOGO_SVG' type='text/javascript'%3E%3C/script%3E"));

// Get Image URL for CSK_LOGO (SFF);
document.write(unescape("%3Cscript src='/psc/" + site + "/EMPLOYEE/EMPL/s/WEBLIB_FL_CSK.ISCRIPT1.FieldFormula.IScript_Set_Image_URL_Variable?var=cskLogoSFF&img=CSK_LOGO_SFF_SVG' type='text/javascript'%3E%3C/script%3E"));

var $jq = jQuery.noConflict();
$jq(document).ready(function(){

  // Get current Image Source;
  var imageSrc = $jq('#PTNUI_LP_HEADER_PTNUI_LOGO img').attr('src');


  if (imageSrc != null) {
    if (imageSrc.indexOf("PTNUI_ORACLE_LOGO_SFF") < 0) {

      // Use Regular Image;
      $jq('#PTNUI_LP_HEADER_PTNUI_LOGO img').attr('src', cskLogo);

    } else {

      // Use Small Form Factor Image;
      $jq('#PTNUI_LP_HEADER_PTNUI_LOGO img').attr('src', cskLogoSFF);

    }
  }



});


Result:


Overriding the Favorite Icon for Fluid:

I am not sure if many of us noticed this but there is a delivered icon image (LOGO_FAVICON) on every browser tab beside the page title for all Fluid pages. This image/icon is called the Favorite Icon.



Someone has already asked Oracle on how to change this favorite icon image? According to Doc ID 2004996.1, currently there is no way to override this image other than updating the delivered image (LOGO_FAVICON) with a custom image using App Designer. Also, there might be plans to incorporate this as a configurable item in the future releases. You may choose to perform the steps detailed in the Oracle Support document.

Refer the following document on My Oracle Support for more details:
E:FLUID- How To Access Favicon On Fluid Landing Pages? (Doc ID 2004996.1)

I don't think I like the idea of replacing the delivered image LOGO_FAVICON (as suggested in Doc ID 2004996.1). There would be no way to identify that we made a customization since it is an image object.

Let us look at the option of using the jQuery image replacement technique detailed in the preceding section for overriding this delivered image LOGO_FAVICON.

Once again, I am updating my image replacement javascript object CSK_FL_IR_JS. I am finding all the occurrences of LOGO_FAVICON (delivered image) under head -> link (where href attribute contains LOGO_FAVICON) and replacing it with a custom image (CSK_LOGO_FAVICON) using jQuery.


Updated javascript (CSK_FL_IR_JS) for reference:

// Get Image URL for CSK_LOGO (FavIcon);
document.write(unescape("%3Cscript src='/psc/" + site + "/EMPLOYEE/EMPL/s/WEBLIB_FL_CSK.ISCRIPT1.FieldFormula.IScript_Set_Image_URL_Variable?var=cskFavIcon&img=CSK_LOGO_FAVICON' type='text/javascript'%3E%3C/script%3E"));

// Get Image URL for CSK_LOGO (Fluid);
document.write(unescape("%3Cscript src='/psc/" + site + "/EMPLOYEE/EMPL/s/WEBLIB_FL_CSK.ISCRIPT1.FieldFormula.IScript_Set_Image_URL_Variable?var=cskLogo&img=CSK_LOGO_SVG' type='text/javascript'%3E%3C/script%3E"));

// Get Image URL for CSK_LOGO (Fluid SFF);
document.write(unescape("%3Cscript src='/psc/" + site + "/EMPLOYEE/EMPL/s/WEBLIB_FL_CSK.ISCRIPT1.FieldFormula.IScript_Set_Image_URL_Variable?var=cskLogoSFF&img=CSK_LOGO_SFF_SVG' type='text/javascript'%3E%3C/script%3E"));

var $jq = jQuery.noConflict();
$jq(document).ready(function(){

  // Get current Image Source;
  var imageSrc = $jq('#PTNUI_LP_HEADER_PTNUI_LOGO img').attr('src');

  if (imageSrc != null) {
    if (imageSrc.indexOf("PTNUI_ORACLE_LOGO_SFF") < 0) {

      // Use Regular Image;
      $jq('#PTNUI_LP_HEADER_PTNUI_LOGO img').attr('src', cskLogo);

    } else {

      // Use Small Form Factor Image;
      $jq('#PTNUI_LP_HEADER_PTNUI_LOGO img').attr('src', cskLogoSFF);

    }
  }

  // Replace Browser Favorite Icon(s);
  $jq('head link[href*=LOGO_FAVICON]').attr('href', cskFavIcon);

});


We are ready to test these changes now. We can see from the screenshot below that all occurrences of LOGO_FAVICON (delivered image) have been replaced with CSK_LOGO_FAVICON (custom image).