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:
- you're referencing the wrong properties file in your xsd
- you haven't set the properties/labels correctly in your properties file
- 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.
精彩评论