Added by Andrew Savory, last edited by Niels van Kampenhout on Jun 07, 2007  (view change)

Labels:

backend backend Delete
templates templates Delete
hints hints Delete
tips tips Delete
validity validity Delete
check check Delete
validity-test validity-test Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  • The CForms editor support html elements in layout files since version 6.04.xx (rev. 4093). More control over the styling of your backend templates! HTML elements must be in the xhtml namespace (http://www.w3.org/1999/xhtml). An example:
    <layout xmlns:x="http://www.w3.org/1999/xhtml">
      ..
      <template name="/path/to/element">
        <x:div>
          <textfield id="/path/to/element"/>
          <x:a href="#">some link</x:a>
        </x:div>
      </template>
      ..
    </layout>
    

    In short, you can wrap layout elements with xhtml.

  • A java.lang.NullPointerException when trying to display a template editor in the CMS is usually caused by a problem in the schema.
  • i18n not working? Check the correct paths for i18n and bl in types.xml.
  • Picker names cannot include a '-' since they are converted to javascript.
  • (from version 6.04.xx) Turn on development mode by setting the stage flag in your types.xml as follows:
    <types stage="development">
      ..
    </types>
    

    This will turn off caching for the model/binding/template pipelines.

  • auto-generate i18n labels (from version 6.03) :
    http://localhost:50000/editing/cf2/generate-i18n-catalogue/<template-name>
    

    This will generate field labels of all the leaf XML nodes plus i18n keys for simpleType enumerated lists! Saves a lot of typing work..

  • As of v6.03.05 all htmlfields can be set to @preview='true'. This will render the htmlfield as plain html (preview mode) with a button. Clicking the button will instantiate a new HtmlArea and render it instead of the preview. When multiple htmlfield[@preview='true'] are being used on a single page, only 1 can be set to EditMode at a time, all the others will be put into PreviewMode until the 'edit' button is clicked again. The HtmlAreas that have been instantiated already will be cached locally for reuse.