Making Objects Accessible in the Branding Framework

The Branding Framework pages are really useful because they provide the ability to add and update branding-related objects from within the PIA. These pages provide a convenient alternative to having to open up App Designer to make simple changes to HTML, JavaScript, Images, or Style Sheets. One limitation that I have found with the Branding Framework is that you cannot use it to modify objects that were not created with the framework. For example, if I want to make a change to the PT_COMMON HTML definition, then I would I have to make this change in App Designer. It turns out that there is a delivered PeopleCode library that allows us to manage the Branding Framework objects. I would like to demonstrate how this library can be used to add an existing object to the Branding Framework so that the object can be modified from the PIA.

I will start off by creating a new HTML definition in App Designer.


As I mentioned above, I cannot simply go to the Branding Objects page (PeopleTools > Portal > Branding > Branding Objects) in the PIA to modify the contents of this object. When I go to the Branding Objects page at this point, I am presented with no modifiable objects.


I made a simple page to get the newly created object imported into the Branding Framework. The page has an input field and a button.


This page will take an HTML object name in the input field and upload the object to the Branding Framework on the button click.


When the user inputs the HTML object name into the input field and clicks the OK button, a small piece of PeopleCode fires.


import PTBR_BRANDING:BrandingObj;

/* Populate the user inputted object name */
Local string &sHTMLObjName = PSM_WRK0.CONTNAME.Value;

/* Reference the BrandingObj class */
Local PTBR_BRANDING:BrandingObj &objBranding;
&objBranding = create PTBR_BRANDING:BrandingObj();

/* Call the new method with the object name, object type (H-HTML,I-Image,J-JavaScript,S-Style), user ID, and date */
&, "J", %UserId, %Datetime);

/* Call the save method to save the object to the Branding Framework */
If (& Then
 MessageBox(0, "", 0, 0, "Saved");
 MessageBox(0, "", 0, 0, "Save Failed");

This PeopleCode uses the BrandingObj class of the PTBR_BRANDING application package to import the HTML object definition as a JavaScript object in the Branding Framework. The BrandingObj class can be used in the same fashion for uploading other object types such as images or style sheets into the Branding Framework.

Now when I go back to the Branding Objects page in the PIA, I can see my newly imported JavaScript object.


I am no longer bound to only being able to update this object’s content in App Designer.  I can now modify this object from within the PIA.

2 thoughts on “Making Objects Accessible in the Branding Framework

    • Colton Fischer says:

      Hey Sasank! Thanks for sharing the related article. Hopefully we will see some improvements to the Branding Framework in the 8.56 Tools that will make managing these objects a bit easier.
      It’d be really be nice to see them incorporate an enhanced PIA JavaScript editor like the one you demoed at Alliance. That was a very interesting solution that you came up with.

Leave a Reply

Your email address will not be published.