Added by Andrew Savory, last edited by Niels van Kampenhout on Jun 07, 2007
()
- 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.
- You can view a list of types available with links to the model, template, binding, layout and validity-checker at http://localhost:50000/editing/cf2/validity-test/
- You can view the model, template and layout of a form at http://localhost:50000/editing/cf2/model/templatename, http://localhost:50000/editing/cf2/template/templatename, http://localhost:50000/editing/cf2/layout/templatename
- To check the consistency of businesslogic, layout and schema definitions, call the following pipeline: http://localhost:50000/editing/cf2/validity-test/check/templatename where templatename is the name of your backend template as defined in your types definition file.
- You can preview the form at http://localhost:50000/editing/cf2/showForm/templatename/path/to/your/xmlfile.xml
- 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.