Warning – Frontend Editing is a bit of work to install it the first time. :) But it’s worth the time.
1 Gentics Content.Node JS API
Find out more about the awesome API
2 Functionality in demo portal
These functionalities are implemented in the current demo example:
- Present EDIT and NEW link for editing pages or creating new pages
- Check editing permissions for this folder
- Display ID of page and folder name of page edited
- Use language code in case of creating a new page
- After publishing you have to clear the cache in the Gentics Content Connector.
In case you use FSCR, you can not use the instant publishing feature.
3 Configuration of Frontend Editing
3.1 How to make a tagtype editable in frontend (=portal)
If you use this implementation here, you can define each tagtype in the CMS templates which should be editable in frontend. This enables you to select which tagtypes to choose.
Example of editable tagtype, add id=“feedit_
3.2 CMS authentication module
You also have to configure the CMS authentication module in Gentics Portal.Node PHP.
<?php $this→widget(‘cmsuserauthentication.widgets.CmsuserauthenticationWidget’); ?>
// cms user authentication module 'cmsuserauthentication' => array( 'class' => 'common.modules.cmsuserauthentication.CmsuserauthenticationModule', 'authUrl' => 'http://cms.<domain of CMS>/CNPortletapp/rest/auth/login', //'http://'.$_SERVER['HTTP_HOST'].'/gcnproxy/CNPortletapp/rest/auth/login', 'salt_secretkey' => 'SecretSalt1234#', 'username_sessionattr' => 'email', 'cmsBackendUrl' => 'http://cms.<domain of CMS>/backend.php' ),
All CMS users which have to have access via frontend editing have to get a password md5-encrypted out of salt-secretkey and username. Code: $password = md5($this→salt_secretkey.$username);
Place this script on your CMS server in /Node/apache/htdocs/ named backend.php
You can find this script in
Code of encryption_class.php can also be found there.
3.3 CMS content element for Frontend Editing
The code for your Frontend Editing tagtype which must be included in your CMS pages at the head can be found in the examples-section.
It is important to deactivate the “redirect_check_referer” feature in CMS. If this feature is not disabled the portal can not find the latest version of alohaeditor. Also activate the feature $FEATURE[“live_urls”], and make sure, the Nodes hostname is correctly set.
3.4 This is the code for FEEdit.js
Can be found in examples section – must be included in pages before the Frontend Editing tagtype.
4 HTTP Proxy
4.1 Aloha Editor – Frontend Editing
To request the Aloha Editor libraries from the CMS server (with probably a different domain) via Ajax, you have to use this proxy, so your requests look like local portal requests, i.e. http://www.
Additionally you need the proxy on the CMS server for requesting the previews of modules as local requests on the CMS server.
Create a directory in
4.2 Proxy files
We added a HTTP proxy to the examples, but we can not garantuee 100% functionality. This proxy did a good job for us, but it’s not our product.
Also think about the security issues. A proxy is also a back-door to a backend system, in case your CMS is inside your firewall, you open a door for a potential intruder. So please use it with care and ask your system administrators for advice to use it for good.
Find this example in scripts/examples
.htaccess – redirects all path after gcnproxy to proxy … /gcnproxy/.Node/?do=100 index.php – proxy script http.inc.php – part of proxy script settings.conf.php – settings file of proxy script