Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCU-1866 backport

...

On the author instance, the result on the page is an area bar and an end marker. The title property is rendered in the bar. When editors click the Add icon in the New Component box they can add components inside the area.

Attributes:

name

Name of the area definition node. 

contextAttributes

A hash of key-value pairs. Any custom attribute and its value as retrieved from the current context.

Code Block
languagehtml/xml
[@cms.area name="content" contextAttributes={"divIDPrefix":divIDPrefix, "componentModel":model} /]

cms:component

The cms:component directive (

Javadoc
0info.magnolia.templating.freemarker.ComponentDirective
) renders a component. The content attribute defines what content the component edits. This tag is commonly used inside the list directive to loop through the components in a map.

The content to render, and possibly edit in case of an editable component, is passed in the content attribute. On the author instance the directive renders a component toolbar. The value of the title property is rendered in the bar.

Attributes:

editable

Defines whether edit icons should be displayed. Mainly useful if content is inherited. Default is cmsfn.isFromCurrentPage()

templateThe template defined in the node or item. Name of the component definition to use.
dialog

Opens the specified dialog when editing the component. 

contextAttributes
A hash of key-value pairs. Any custom attribute and its value as retrieved from the current context.
 


Code Block
languagehtml/xml
[@cms.component content=component contextAttributes={"indexString":indexString, "useIndex":useIndex}/]

Example:

Code Block
[#list components as component ]
   [@cms.component content=component /]
[/#list]

...

The following attributes can be passed with any directive. They define which content the element created by the directive should work on.

Attributes:

contentAn item, list or map.
workspaceWorkspace used if path is defined. Same as of the current content
pathPath in the workspace.

Content attribute

The content attribute tells a script which item it should operate on. Scripts typically operate on the "current" node. For a page-level script the current node is the page, for an area-level script the current node is the area, and for a component-level script the current node is the component. However, there are cases where you want the script to operate on a different node. This is where the content attribute is handy.

...