English 中文(简体)
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.

问题回答

暂无回答




相关问题
REST question: PUT one representation, GET a different one?

Short version of the question: Does "GET" at a particular URI need to match what was "PUT" to that URI? I think not. Here s why: Given that a resource is an abstract thing that is theoretically ...

Sending the variable s content to my mailbox in Python?

I have asked this question here about a Python command that fetches a URL of a web page and stores it in a variable. The first thing that I wanted to know then was whether or not the variable in this ...

SharePoint Multiple New Item Forms

I ve got a custom list with a custom content type. I m aware that when you create a new item you can see a drop down for the different content types on that list which I assume all have their own ...

Downloading pictures/Word documents using ASP.NET

If I put the following code: Response.ContentType = "image/jpeg" Response.AppendHeader("Content-Disposition", "attachment; filename=capitol.jpg") Response.WriteFile(MapPath("capitol.jpg"))...

Detecting custom folder content types in MOSS2007

Given an SPListItem representing a folder, I need to find out whether it has the builtin folder content type, or a custom folder content type (with additional fields). Here is what I do ...

热门标签