1 Loading Aloha Editor
Load the Aloha Editor should always be done with URLs starting with /CNPortletapp/latest/…. Those URLs will be answered with a HTTP redirect to the URL containing the build timestamp of the Aloha Editor versioned currently contained in the Backend. This ensures that
- URLs to load Aloha Editor do not change when updating the Backend
- Browsers will cache different versions of Aloha Editor differently, so after an update of the Backend, it is no longer necessary to clear the browser cache to load the currently contained version of Aloha Editor.
1.1 Issues when using https://
When using an additional Web Server to handle SSL (https://) that forwards the requests to the Backend Apache with http:// the redirect will be done with http:// also, because the redirector does not know about https://. To handle such situations, there are two features, that can be used:
If the feature redirect_check_referer is turned on, the redirector will check the Referer URL, and use the schema and hostname from it. In cases, where the Referer might be missing, the feature redirect_assume_https will always enforce the redirect to https:// and the hostname from the Host request header.
An example configuration could look like this
// check the Referer for https:// and hostname $FEATURE["redirect_check_referer"] = true; // always assume the originating request to be https:// $FEATURE["redirect_assume_https"] = true;
2 Aloha Editor Plugins
2.1 Configuration of loaded plugins
See Aloha Editor Gentics Content.Node Plugins and Configuration of Aloha Settings
2.2 Gentics Content.Node Integration Plugin gcn/gcn
The Aloha Editor Gentics Content.Node Integration Plugin allows Gentics Content.Node to use Aloha Editor for editing page contents. Settings are provided automatically and must not be changed by implementation. The plugin will also place tagicons in the content if Contenttags are used. Also delete icons are provided which make it possible to remove a contenttag from a page.
2.3 Gentics Content.Node Fileupload Plugin gcn/gcnfileupload
The Gentics Content.Node Fileupload Plugin allows you to upload files by adding a button to the FloatingMenus “Link” tab. If you click the “Upload File” button a prompt will appear asking you to select a file. You may also add a description for your file. The file will be linked as soon as the upload finishes.
2.4 Gentics Content.Node Image Plugin gcn/image
The Gentics Content.Node Image Plugin is currently used to edit images from the backend and is not designed to be used with standard Aloha Editor inline editing.
2.5 Gentics Content.Node Linkbrowser Plugin gcn/linkbrowser
The Gentics Content.Node Linkbrowser Plugin will interface the Repository Browser with Gentics Content.Node so that pages, images and files from the Gentics Content.Node Backend can be selected.
3 Annotating Editables
In order to have better control over the editable configuration, it is possible to have the root Elements annotated, by activating the feature
$FEATURE["aloha_annotate_editables"] = true;
When enabled, the root elements of Aloha Editor editables will be annotated by adding the following classes (if applicable):
- GENTICS_construct_[constructkeyword] where [constructkeyword] is the keyword of the construct
- GENTICS_tagname_[tagname] where [tagname] is the keyword of the tag
- GENTICS_tagpart_[partkeyword] where [partkeyword] is the keyword of the part (if any)
- GENTICS_parttype_[parttype] where [parttype] is the simplified Name of the Part Type.
The Part Type names are simplified by first removing the characters ‘(’, ‘)’ and ‘/’, then all non-alphabetical characters are replaced by ‘_’ (underscore). Finally the name is converted to lowercase.
The following table will show, how Part Type names are simplified:
Name | Class |
---|---|
Breadcrumb | breadcrumb |
Checkbox | checkbox |
Datasource | datasource |
DHTML Editor | dhtml_editor |
File (localpath) | file_localpath |
File (Upload) | file_upload |
Folder (Upload) | folder_upload |
HTML | html |
HTML (custom form) | html_custom_form |
HTML (long) | html_long |
Java Editor | java_editor |
List | list |
List (ordered) | list_ordered |
List (unordered) | list_unordered |
Navigation | navigation |
Overview | overview |
Select (image-height) | select_image_height |
Select (image-width) | select_image_width |
Select (multiple) | select_multiple |
Select (single) | select_single |
Table ext | table_ext |
Tag (global) | tag_global |
Tag (page) | tag_page |
Tag (template) | tag_template |
Text | text |
Text (custom form) | text_custom_form |
Text (short) | text_short |
Text/HTML | text_html |
Text/HTML (long) | text_html_long |
URL (file) | url_file |
URL (folder) | url_folder |
URL (image) | url_image |
URL (page) | url_page |
Velocity | velocity |
For the sake of completeness, this table contains all existing Part Types, although most of them can not be used as editables.