XMLContent

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
== Extending edit options for HtmlWidget ==
+
== Data Types ==
It is possible to extend the [[HtmlWidget]] that is used by the XMLContent forms so that the different OpenCMS galleries can be accessed for creating nice html. This is quite easily done by opening up the XML Schema file for the XML Content type you wish to extend, and add the following code:
+
When creating XML contents, different data types can be used according to the requirements of the desired content. To each data type, a default widget is mapped which creates the input element (e.g. a text input field) for the form based XML content editor.
  
<layouts>
+
OpenCms provides the following data types for XML contents:
  <layout element="Text" widget="HtmlWidget" configuration="source,link,anchor,formatselect,imagegallery,downloadgallery,linkgallery,htmlgallery,tablegallery,height:400px" />
+
* [[OpenCmsBoolean]]
</layouts>
+
* [[OpenCmsColor]]
 +
* [[OpenCmsDateTime]]
 +
* [[OpenCmsHtml]]
 +
* [[OpenCmsLocale]]
 +
* [[OpenCmsString]]
 +
* [[OpenCmsVfsFile]]
  
inside the following tags:
+
== Widgets ==
 +
Widgets are used to create a suitable content editor for XML content. The widgets to be used are defined in the [[Defining OpenCMS structured XML content|XML Schema Definition]] of your XML content type.
  
<xsd:annotation>
+
* [[BooleanWidget]]
  <xsd:appinfo>
+
* [[ColorpickerWidget]]
    ... Add the layouts element here ...
+
* [[ComboWidget]]
  </xsd:appinfo>
+
* [[DateTimeWidget]]
</xsd:annotation>
+
* [[DownloadGalleryWidget]]
 
+
* [[HtmlGalleryWidget]]
Of course you can modify the configuration attribute to display only the extra elements you would like to make available to the content creators.
+
* [[HtmlWidget]]
 +
* [[ImageGalleryWidget]]
 +
* [[LinkGalleryWidget]]
 +
* [[SelectorWidget]]
 +
* [[StringWidget]]
 +
* [[TableGalleryWidget]]
 +
* [[TextareaWidget]]
 +
* [[VfsFileWidge]]
  
 
== External Links ==
 
== External Links ==

Revision as of 10:00, 10 November 2006

Data Types

When creating XML contents, different data types can be used according to the requirements of the desired content. To each data type, a default widget is mapped which creates the input element (e.g. a text input field) for the form based XML content editor.

OpenCms provides the following data types for XML contents:

Widgets

Widgets are used to create a suitable content editor for XML content. The widgets to be used are defined in the XML Schema Definition of your XML content type.

External Links

Creating XML Content Definitions

Extend Edit Options for HtmlWidget

Nice visual Tutorial for XML Content

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox