Blogs

Making XML form name as window title name
Raghavendranath Garlapati
Business Card
Company: IBM
Posted on Oct. 31, 2009 11:52 AM in Enterprise Portal (EP), Knowledge Management (KM)

Subscribe.Subscribe
Print. Print
Permalink Permalink

We use xmlforms for publishing news, articles etc... These xml forms are build based on Forms Builder. We can make these xml forms available in KM folders by using ‘Forms Availability' option in system Administration ->System Configuration->KM->CM->Forms Based Publishing.

In this topic I am not going to explain about creating the xml forms using Forms Builder as it is already covered by many experts.

When we use xml forms for publishing the news, it will store as the Title name that was given by you.

But if you create your own template, then we generally use name/title UI element in the xml form. This UI element is mapped with the property ‘displayname' as shown below.

XML Form Builder

If this property is not mapped in the Property Reference, then it will save in its short id which is alphanumeric. If we have so many news items or articles created based on this xml form, then it is very difficult to identify particular news based on the short id. So it is recommended to use the ‘displayname' property as reference. Also Title Attribute is created in the database schema and is mapped in edit form and show form with schema reference property.

Let us say some articles and news are created based on xml form template that you created.  Now when you open any of the article/news it will display in the browser with the window title of that xml form name.

It is good if we display the article name as window title name when you open an article.

If you want to display the  article name as window title name then you need  to open the xsl file. Suppose your xml form name is  ‘testForm'.  Once you build this form using forms builder,  then the relevant files will store in

Content Administration -> KM Content .

Navigate to Root ->etc->xmlforms.  Open the folder of your xml form ‘testForm'.

Open the  testFormShow.xsl file. Download that to your desktop.

Open the xsl file in Notepad and Navigate to

 

<Head><title>

.....

....

</title><head>

Comment all the code inside the title tag and add the below code

<xsl:call-template name="outputvalue">

      <xsl:with-param select="Title" name="value"/>

</xsl:call-template>

where title is the UI element of xml form where it is mapped with display name properties.

Article before changes title

Article before code changes

Article after changes to title

Article after code changes

Save the xsl file and upload the file in the same folder in KM content by overwriting the existing one. This will display the article name as the window title name.

Advantage

Title name will be very much useful for monitoring the article like how many users read this article.

It is very much easy to recognize in third party monitorings like google analytics etc..

Disadvantage

If you rebuild the xml form template again using forms builder tool then all the changes you made to the xsl files will lost. You have to add them again after rebuild of the xml template.

Raghavendranath Garlapati SAP EP Consultant working in IBM India. He has exposure on EP, KM & TREX


Add to: del.icio.us | Digg | Reddit


Comment on this articlePlease share your opinions on my Blog. Thank you
Comment on this weblog
Showing messages 1 through 3 of 3.

Titles Only Main Topics Oldest First

  • Great example
    2009-11-02 05:16:35 P. Gopala Krishnam Raju Business Card [Reply]

    This is a great example on how you can customise SAP standard applications with simple changes instead of starting from scratch.Weldone Raghu!!!

Showing messages 1 through 3 of 3.