The <cms:editable>
tag
This tag enables the direct edit feature in a page. Furthermore, it provides the JavaScript/CSS code which is neccessary for the direct edit button.
Attributes:
Name | Description | Required |
provider | This value specifies the fully qualified name of a class implementing the OpenCms interface for direct edit providers. This class is used to generate the direct edit HTML fragments (i.e. the "direct edit button"). Currently available classes: org.opencms.workplace.editors.directedit.CmsDirectEditTextButtonProvider org.opencms.workplace.editors.directedit.CmsDirectEditDefaultProvider | no |
file | This value specifies a file containing the fragments inserted at the position of the editable tag. If not specified, the system default fragments are used. | no |
mode | This value specifies the mode for inserting the direct edit buttons/links:
| no |
Body:
This tag has no body content!
Example usage:
Enables the direct edit feature and includes the body element from a file which will be editable directly:
<cms:editable />
...
<cms:include file="demo_01.html" element="body" editable="true" />
Enables the direct edit feature with textual links and shows a list of xml contents with the direkt edit link placed manually:
<cms:editable provider="org.opencms.workplace.editors.directedit.CmsDirectEditTextButtonProvider"/>
...
<cms:contentload collector="..." ... editable="manual">
...
Edit this: <cms:editable mode="manual"/>
</cms:contentload>
For further examples, look into examples_directedit.