UPK - Customizing Templates

One of the ways UPK helps you rapidly develop content is by providing standard text for common actions. Instead of having to type most of the screen interactions (e.g. Click the Print button), the UPK system fills in that information for you. This information is contained in our template file. Since template text is translated into all Player languages, you get the added bonus of a jump-start for your translation projects.

Basically, template text consists of a combination of an Action, an Object and the Object name. Using our example above: Click the Print Button. The action is "Click", the object is "button" and the object name is "Print". The template contains all this text, so it can be concatenated into a sentence.

If you wish to change the template text, there are a couple ways to do it:

1. Change for individual frame. If you want to change the template text for a single frame only, you can bring the template text inline in the topic editor, and edit it like you edit custom user text in the frame properties pane. This has no impact on the rest of the topics.

2. Change for all frames. If you want to change the template text for all frames, you can edit the template itself. All topics that use the edited template will have the new values. You can edit the template by working directly with the .xml file. For those of you like me who don't have a degree in reading XML, there also is an external Template Editor that puts the templates in a more readable UI.

Before we go changing the template text, let's do some basic housekeeping. I tell you this in every blog post, so you know what's coming. Make a copy of the existing template. This backup serves two purposes. First, it gives you a fall-back in case something happens. Second, when you upgrade to a newer version of the software, the standard templates will be updated. Making a copy ensures that your template changes will remain intact.

Now we can start. From the developer, open up the copy of your template package, and copy the template.xml to your desktop. The template editor is installed in the same location as your developer client. When you run the template editor, you need to open a template file to edit. Select the file from your desktop.

The top portion of the Template Editor shows the objects (called Classes in the template.xml file). Making a change to any of these items will change the name in all instances it appears.

In the middle are the various actions that can be performed on an object, along with the corresponding template text. There is a preview at the bottom, so you can see the text you're building. Items that appear in bold are unique for the specific action/object combination (these are known as local templates). Updates to the bold items will affect this action/object combination only. All other items (non-bold) are applicable to the whole system. Changes here will affect all instances where the specific action is performed. Note that the local templates override the system settings, so if you change a system template, you still may have to update the local templates for that action.

template text editor.PNG

Let's say you want to change the template text from Click the Print button to Press the Print button.
1. You would first find the button object, which is near the bottom of the class list.
2. Next, select the action for clicking - in this case LClick1, which stands for a single left-click on the object.
3. Highlight the row labeled "Text".
4. Double-click the text that appears in the middle of the template editor, and a dialog opens that allows you to edit the text.
5. Make your edits, and close the dialog. In our example, change the word "Click" to "Press".
6. Notice that the preview updates to show you a sample of the new template text.
7. Save your template.xml
8. Copy it back to your newly created package, and save the package.

Now when you view your topics, you will see the new template text.

You can also use the template text editor to change the standard instructional text that appears on start and end frames as well as in Know It mode. For more details on how to customize the template text, see the section in the Content Development Manual entitled "Customize Templates"

What kind of modifications do you make to your templates? Are there objects that should have different text? Feel free to discuss in the comments.


I'm glad you codified the steps! One thing I consistently change is the Do It text, "Enter a valid value e.g. ___" because no one knows what e.g. means anymore ('exempla gratia,' or 'for example'). Instead, I replace e.g. with "such as". I often wind up editing that template text anyway, because in UPK 3.6.1, it often runs the text together, which is incorrect. "Enter a valid valuee.g. ___."

Posted by Bart Rhoten on August 26, 2010 at 05:24 PM PDT #

I have a question, we aretrying to integrate UPK Context Help with Oracle Applications 11i10. I have followed all the instructions described in the InApplication_Support_Guide.pdf document. (For accessing this document please refer to metalink note 1118582.1) However, I am not sure how to setup the system profile option HELP_WEB_AGENT with valid values. URL=http://:/oracle/hemi/oracle_gateway.html?dbc=d:oracleo11iappl nd11.5.0secure.dbc From the above string, what should we replace for http://:/oracle/hemi/oracle_gateway.html We have installed UPK Server in a remote desktop. After that, we have installed UPK developer on our PC's and we access the library (UPK server installed on remote desktop) from our PC's. So, not sure what exactly the servername and port should be. Should we just use Oracle Applications link and port? Also, for the dbc file, the dbc file is located under $FND_TOP/secure directory. But, from the above string it is referencing to some local dirve like d:oracleo11iappl nd11.5.0secure.dbc. So, what should be real value here in order to reference the .dbc file from $FND_TOP/secure directory. I apologize for this long question. I appreciate your help. Thank you in advance. Venkat.

Posted by Venkat Kancherla on September 22, 2010 at 05:09 AM PDT #

FINDING THE TEMPLATE.XML File (English) Very useful post... except I cannot find the appropriate template.xml file (in English. The UPK Content Development guides says to find it in the library - system/templates folder (see below)... but this is proving to be illusive. Suggestions how to find the appropriate file? Thanks, Carol Here is the excerpt from UPK guide: To create and customize a template: 1. Open the Library. 2. Navigate to the System/Templates folder, and then open the folder for the language templates you want to customize. 3. In the language folder, select the template set you want to copy.

Posted by Carol on October 22, 2010 at 05:12 AM PDT #

Hi Carol - In your example, as you navigate through the library, you would open the System/Templates/en folder, and select the template you use. The system uses "Standard" as the default template. When you double-click the template, it will launch the package editor. The template.xml is located in the package. Hope this helps! --maria

Posted by Maria Cozzolino on October 24, 2010 at 09:01 PM PDT #

In a 'stand alone' configuration the template xml files are held on the local PC. If you have a multi-user configuration, UPK 'browses' for template files in the library SQL folder structure, not on the client PC. The template editor app does not appear to let you save templates to the library, only to a local XML file. How do I save/create/convert my template file to the library so that it is recognised by the modules in the library?

Posted by guest on June 03, 2011 at 03:16 AM PDT #

Hi there - You can drag the file from the library to your desktop, edit it locally, and then drag it back to the library. Remember to save your package after you have dragged the file back in! Hope this helps. -- maria

Posted by Maria Cozzolino on June 10, 2011 at 07:15 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

The authors of this blog are members of the UPK product development, management, and marketing teams. On this blog, you'll find UPK news, tips/tricks, upcoming events, and general information on UPK - the easy-to-use, comprehensive content development, deployment, and maintenance platform for increasing project, program, and user productivity.


« June 2016