Start page / Templates (basics) / Composition of templates / Inline tables / Style templates / Examples
Examples
Example: Text input component for entering a background color
Defining the component in the form area:
<CMS_MODULE>
<CMS_INPUT_TEXT name="bgcolor" useLanguages="no">
<LANGINFOS>
<LANGINFO lang="*" label="Background color:"/>
</LANGINFOS>
</CMS_INPUT_TEXT>
</CMS_MODULE>
name="bgcolor": The input component uses the "bgcolor" key value to define a background color. This name may not be changed, as it is a fixed key value.
Inputting a color value via the input component:
Example: Input component for entering a font color
Defining the component in the form area:
<CMS_MODULE>
<CMS_INPUT_COMBOBOX name="color" useLanguages="no">
<ENTRIES>
<ENTRY value="">
<LANGINFOS>
<LANGINFO lang="*" label="default"/>
</LANGINFOS>
</ENTRY>
<ENTRY value="#ee00ff">
<LANGINFOS>
<LANGINFO lang="*" label="superior"/>
</LANGINFOS>
</ENTRY>
<ENTRY value="#00ddee">
<LANGINFOS>
<LANGINFO lang="*" label="lightGrey"/>
</LANGINFOS>
</ENTRY>
</ENTRIES>
<LANGINFOS>
<LANGINFO lang="*" label="Font Color"/>
</LANGINFOS>
</CMS_INPUT_COMBOBOX>
</CMS_MODULE>
Selecting a color value via the input component:
Example: Input component for entering the type of text alignment
Defining the component in the form area:
<CMS_MODULE>
<CMS_INPUT_RADIOBUTTON name="align" useLanguages="no">
<ENTRIES>
<ENTRY value="">
<LANGINFOS>
<LANGINFO lang="*" label="Left"/>
</LANGINFOS>
</ENTRY>
<ENTRY value="right">
<LANGINFOS>
<LANGINFO lang="*" label="Right"/>
</LANGINFOS>
</ENTRY>
<ENTRY value="center">
<LANGINFOS>
<LANGINFO lang="*" label="Center"/>
</LANGINFOS>
</ENTRY>
<ENTRY value="block">
<LANGINFOS>
<LANGINFO lang="*" label="Block"/>
</LANGINFOS>
</ENTRY>
</ENTRIES>
<LANGINFOS>
<LANGINFO lang="*" label="Align:"/>
</LANGINFOS>
</CMS_INPUT_RADIOBUTTON>
</CMS_MODULE>
Selecting a type of text alignment via the input component: