开发者

OpenCMS Content Type - when editing, it doesn't show the names of the fields

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜