views:

47

answers:

1

Hi! I created a custom content type FaqEntry in OpenCMS (three fields - title, question, answer) and registered it. When I create a new file of that type and want to edit it, it shows the three fields there, but it doesn't show their label, i.e. "Title", "Question", "Answer". Do you have any idea as to why?

+1  A: 

So, what does it show then if not the labels you set/expect?

There are three possible reasons why the labels are not showing correctly:

  1. you're referencing the wrong properties file in your xsd
  2. you haven't set the properties/labels correctly in your properties file
  3. you haven't published and restarted the tomcat yet

The labels should be in the file workplace.properties under 'classes' in the the folder structure of your module, i.e. /system/modules/com.mydomain.www/classes/com/mydomain/www/workplace.properties

In your faqentry.xsd the reference should then be like this:

<xsd:annotation>
    <xsd:appinfo>
        <resourcebundle name="com.mydomain.www.workplace"/>
         ...

In the properties file, the labels need to have the proper mapping:

label.FaqEntry.Title = Title Label The Way You Want It

Last, the Tomcat needs to be restarted for the properties to take effect.

Mathias Lin