1 Overview
Type Id | Type Name | Description |
---|---|---|
1 | Text | |
2 | Text/HTML | |
3 | HTML | |
4 | URL (page) | The URL (page) part type provides an element to select a page within any accessible folder. |
5 | Tag (global) | (Deprecated) |
6 | URL (image) | |
8 | URL (file) | |
9 | Text (short) | |
10 | Text/HTML (long) | |
11 | Tag (page) | |
13 | Overview | The overview part type creates and overview which can be configured using a the provided wizzard. |
15 | List | |
16 | List (unordered) | |
17 | List (ordered) | |
18 | Select (image-height) | |
19 | Select (image-width) | |
20 | Tag (template) | |
21 | HTML (long) | The HTML (long) part type can be used to store large amounts of HTML |
22 | File (localpath) | |
23 | Table ext | |
25 | URL (folder) | This part can be used to select a folder. |
26 | Java Editor | |
27 | DHTML Editor | |
29 | Select (single) | |
30 | Select (multiple) | |
31 | Checkbox | |
32 | Datasource | This part type provides static datasources from which a user can pick values. |
33 | Velocity | The velocity part type can be used to evaluate all previously generated text using the velocity markup parser. |
34 | Breadcrumb | This part type can be used to generate breadcrumbs |
35 | Navigation | The navigation part type can be used to create a custom navigation using a velocity template. |
36 | HTML (custom form) | The custom form part type can be used to create custom form elements. |
37 | Text (custom form) | The custom form part type can be used to create custom form elements. |
38 | File (Upload) | The file upload part type is a URL (file) part type which has an additional file upload button. |
39 | Folder (Upload) | The folder upload part type is a URL (folder) part type which has an additional file upload button. |
2 Custom Form Part Type
The custom part type enables the implementer to create custom user interfaces that can be used by editors. The interface can be customized using javascript and stylesheets.
The custom ui template will be defined within the field which contains the html code.
Available variables:
Variable | Description |
---|---|
<nodefieldname> | The name of the field |
<nodefieldvalue> | The value of the html entity |
<nodetextvalue> | The original value |
<nodename> | The name of the tag part |
<nodekeyword> | The keyname of the tag part |
<nodesid> | The session id of the user |
<nodeuserid> | The user id of the user |
<nodecontext> | The context in which the tag fill dialog was opened. (“template”, “content” für Seiten, “tagtype” oder “object”) |
Additionally typical node properties can also be used when the feature ‘customform_resolve_nodetags’ was enabled (e.g. <node TAGNAME>)
The option “inline editierbar” is without any effect. TIP: A guide which explains how to include CSS and JS libraries can be found here
The demo cms project contains the following examples of the custom form tag part type:
- TinyMCE-Editor: This Tag includes the TinyMCE WYSIWYG-Editor.
- HTML Customform Example: This example contains just a custom form field.
- Text Customform Example: The same example like “HTML Customform Example”. In this case the “Text (custom form)” is used.
- [Formular] limitierte Eingabe: An inputfield that can just accept a specified amount of characters.
Special class names can be used to access the custom form elements. The name contains “cnTagPart_” +
3 Velocity Part Type
An example for this tag part type can be found within the demo server in the folder “Demo-CMS-Projekt/Home/Node Tags”.
- Parameter “template”
- Typ: HTML lang
- Content: The Velocity Template Code that should be rendered by the visible Velocity Part Type.
- Parameter “macros”:
- Typ: HTML lang
- Content: VTL Macros which can be used within the implementation.
Example Velocity Tagtyp:
- Part 1: Typ Velocity, Keyword vtl, Visible
- Part 2: Typ HTML lang, Keyword template, Not visible
- Part 3: Typ HTML lang, Keyword macros, Not visible
Errors within the velocity implementation will be diplayed within the Gentics Content.Node im “error stream”.
Use always the .toString() method when comparing two tags within a #if() command.
Example:
#if( $cms.page.object.myprop.toString() == "test" )
4 Breadcrumb Part Type
An example for this part type can be found within the demo installation in the “Demo-CMS-Projekt/Home/Navigation” folder.
- Parameter “startfolder”
- Typ: URL (folder)
- Content: The start folder of the breadcrumb.
- Parameter “template”
- Typ: HTML (long)
- Content: The Velocity-Template of the navigation.
- Parameter “disable_activepage”
- Typ: Checkbox
- Content: False if the current page should be linked in the breadcrumb.
- Parameter “tagname_hidden”
- Typ: Text (short)
- Content: Name of the object property that is used to hide objects wihtin the navigation.
- Parameter “disable_fallback”
- Typ: Datasource
- Content:
- 0 is used for language fallbacks to the Default language,
- 1 or. “yes” um Breadcrumb bei nicht existierender Seite in aktueller Sprache zu beenden
- 2 or. “skip” to skip non exisiting pages in te current language.
- Parameter “tagname_startpage”
- Typ: Text (short)
- Content: Name of the object property that is used for the startpage of an folder.
- Parameter “disable_hidden”
- Typ: Checkbox
- Content: True when hidden objects should be displayed within the navigation.
4.1 Velocity Variables
VLT | Description |
---|---|
$bc.path | An array that contains all folders for the breadcrumb navigation. |
$bc.disableactivepage | True, when the current page should not be linked. |
$nav in $bc.path | An navigation object within the breadcrumb |
$nav.level | The level of the navigation. (0 = Start folder) |
$nav.object | The object that is contained within the navigation object |
$nav.object.object.objectproperty_name | Access to the object property ‘objectproperty_name’ of the given object |
$nav.name | I18n name of the navigation object |
$nav.startpage | The start page of this navigation objekt. The object is related to the active language. Please note that this property directly links to the page object within the navigation object. Pages that are offline will still provide an .url property. Add a check using $nav.startpage.online to verify that the page is online. |
$nav.hidden | True, when the navigation object should not be displayed within the navigation. |
5 Navigation Part Type
An example can be found within the demo server folder “Demo-CMS-Projekt/Home/Navigation”.
- Parameter “startfolder”
- Typ: URL (folder)
- Content: The startfolder of the navigation.
- Parameter “template”
- Typ: HTML (long)
- Content: The velocity template of the navigation.
- Parameter “sortby”
- Typ: Text (short)
- Content: Name of the object property which should be used to sort the elements. (e.g. object.name).
- Parameter “sortorder”
- Typ: Datasource (ASC, DESC)
- Content: Sortorder (ascending of descending)
- Parameter “tagname_sort”
- Typ: Text (short)
- Content: Name of the object property that is used to display a special sortorder. (Format: “sortorder;sortby”)
Parameter “tagname_hidden” Typ: Text (short) Content: Name of the object property that should be used to hide the navigation. By default the object property “navhidden” will be used.
Parameter “objects” Typ: Select (multiple) Content: List of all objects that should be displayed within the navigation. (Pages, Folders, Images, Files)
Parameter “disable_hidden” Typ: Checkbox Content: True, if hidden objects should be displayed within the navigation. All hidden objects will not be shown by default. (See “tagname_hidden”).
Parameter “sitemap” Typ: Checkbox Content: True, if a sitemap should be displayed (All folders will be flapped open)
6 Velocity Variables
Variable | Description | |
---|---|---|
$nav.object | The current element of the navigation | |
$nav.level | The level of the current object (0 = Start folder) | |
$nav.hasItems() | True, if the navigation element contains subelements. | |
$nav.open | True, if the element is flapped open. | |
$nav.relativenr | Position of the element relativ to the parent element | |
$nav.relativecount | Count of all child element of the parent element. | |
$nav.absolutenr | Absolute position of the element over all elements that have been displayed already. | |
$nav.childrencount | Count of all child elements of this element. | |
$nav.inpath | True, if this element is included within the path of the currently displayed page. | |
$nav.currentpage | Wahr, falls dieses Element die aktuell angezeigte Seite ist | $nav.subtree | Renders the subtree (all child elements) of this navigation element. |
Please refere to the list of meta properties for examples and more detailed explanations.