At the start of a template file you can add an inline template that can be included like any other template file. This is handy if you have small parts of your template you want to extract, and don't want or need to create separate templates files.
Setting an anchor in a template file will list it and allow it to be linked to from the Link Panel in the Editor.
And using a property:
See also rw.addAnchor in the hooks file.
Adding the @raw()
tag around templte content will stop Element properties from being processed.
A dropzones is an area within a template where child element can be added. Each dropzone requires a name giving you a consistent & reliable way to manage child items.
Multiple dropzones with the same name can used, but you should be careful not to show them at the same time. This can be useful if you want to show child items in different places based on a control.
Sometimes you want to allow the user to drop the resources directly into the Editor, this can be achieved with the rwResourceDropZone
key.
The following example shows how to support dropping a folder of images directly into the Editor. Place the following in the Template HTML:
You also need a corresponding image control in the Properties file:
The following tags should be placed in the html template file. Using any of the following tags enable editable areas with the page. No setup of configuration in the properties file is required.
Add a simple editible text area with optional default text.
An editable text area with a default value of "Hello World!".
Adds a text area that support the Typography feature.
UI Control Properties can be placed inside of any Template files, including HTML, CSS, and Javascript files.
For example in your Properties.json file you can add the a text field, and then reference that value in your Template files, including HTML, CSS, and Javascript.
In your Template file you can reference the text field by using double brackets and the ID name.
Anything set in rw.setProps is also available to all Templates files in your component.