Using CustomizationsRT

This Tutorial will look at how to use the CustomizationsRT module to improve the management of any customised WebLingo files you want to use in your Livelink system. CustomizationsRT is a wonderful utility module maintained by one of OpenText's GS staff - Hans Stoop - and one of its many uses is to manage redirects from standard Livelink WebLingo files to your own custom ones. The module can be downloaded from the OpenText Knowledge Center. In this tutorial, clicking on any of the images will show a larger, clearer version of that image.

Once you have downloaded the module, you will need to install it as a normal Livelink module, on a Livelink server that has the Builder installed as well at this point. Once successfully installed, load the Builder and you should see the CustomizationsRT module listed in the OSpace view of the Builder.

Create a new Module in the BuilderWe need to create a new module to take advantage of the functionality provided by CustomizationsRT. Luckily, CustomizationsRT comes with several wizards, one of which we can use to create a new module, this can be found in the Tools menu as shown in the screenshot on the left (click to enlarge). Answering a few simple questions via this wizard will create a module skeleton which we will flesh out. This wizard can be used to create modules that don't need to interact with CustomizationsRT as well.

In the first popup screen of the wizard - titled Enter the Prefix - we shall leave empty for this demo. For the second screen - Enter the internal module name - we shall enter customWebLingo and the same value for the third screen - Enter the modules display name. On the final screen - Enter the module version - we shall accept the default value provided. Press the okay buton on the next two screens and then you will need to restart the Builder.

Now that we have the skeleton of our module, we need to install in into our Livelink instance, using the standard way of installing Livelink modules, just like we did for the CustomizationsRT module itself. During the module installation process, we will need to restart the Builder again.

Orphan a node in the BuilderWe are now ready to start coding our new module. The first thing we need to do is to create an Orphan of CustomizationsRT in our new module, this is because we are going to call functions of CustomizationsRT during the start of Livelink, we need to ensure that the CustomizationsRT Ospace is loaded before out own ospace/module. To do this, in the OSpaces view, locate the CustomizationsRT module, expand it and locate the item called Root, right click on it, select Orphan from the context menu and then select customWebLingo. Name this new item CustomizationsRT Root Orphan.

Adding a module to the Globals contextNext, we need to register our new module with the Livelink Globals, the WebModule is added to the globals so we can access functions of it during the initialization. This is done by locating the WebModule node of our new module and right clicking on it and then choosing Add to globals ... from the context menu. When prompted, accept the default reference name.

Orphan a node in the BuilderNow we can begin to add the actual code to our module so that it will do what we want it to. Open the OSpace containing our new module and find the Root object and click on it. In the right hand pane of the Builder, you should see several items, one of which is called Startup, double click on this one to open this script up in the Builder's code editor.

In the script editor, add the following two lines of code, the first assigns the path on the server to our module into a string, and the second registers this path with the CustomizationsRT module that handles redirects of WebLingo files.

String filePath = $customWebLingo.customWebLingoModule.pathPrefix()
$CustomizationsRT.HtmlMap.MapModules(filePath + 'modulemap')

Orphan a node in the BuilderOnce we have added this code, we need to compile the Script - by clicking on the Compile button in the toolbar (Compile this script). Once the script has compiled, close this window, pressing yes if prompted to save the changes you have made if prompted - this is only the case in earlier versions of CustomizationsRT. We now need to regenerate our module's OSpace, we can do this by clicking on the customWebLingo Globals node and then locating the Build OSpace item in the right hand pane, right click on this and select the Run option.

Orphan a node in the BuilderWe now turn to Windows Explorer, locate the folder which contains our new module - which should be in <Base LiveLink file path>\ module \ customWebLingo\. In this folder, create a new directory called modulemap. this folder will be our base folder into which all our customised WebLingo templates will be stored. In that directory, create a new file called commonheader.html, and then open this new file in a text editor such as NotePad. Into this file add the following code :

<strong>Hello World</strong><br/>
My First WebLingo Customisation using CustomizationsRT

Save this file and then restart the Builder to complete your development. If you now use a web browser to access the Enterprise Workspace of your LiveLink instance, you should see the impact of your changes immediately.

This approach will work for all WebLingo Templates that exist in the <Base LiveLink file path>\html directory, if you need to replace one that is part of a module, simply create a folder in the modulemap directory you created, named the same as the module name without the version information, so for webwork_3_0_0 simply call the folder webwork Whenever you add a new file into this manner, you will need to restart your Livelink instance for it to use the new WebLingo file.

You should now be able to create an add your own custom WebLingo templates to Livelink. With all of your templates held in a single top level folder, it will be much easier to know which ones you have modified when doing an audit, configuring a new server or deploying a patch / service pack / upgrade to Livelink. Please also remember that if the WebLingo file that you have modified is replaced in this way, you should compare both files otherwise the changes in the new version may cause issues with your Livelink instance. Some other useful functions within the CustomizationsRT module include :

Website Designed by Adservio Consulting Valid HTML 4.01 Strict    Valid CSS!    Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0