In order to get the inline edit without forcing users to access the backoffice (system/login) you have to:
- add <cms:editable/> somewhere in your template (<head> section?)
- include the current element body with something like: cms.include(null, “body”, true);
please note “true” param that means you can edit … for details take a look here
That’s enough to get inline editing for users that login using the backoffice (system/login).
But … if you’d like to:
- have a custom login page
- get inline editing for users that use your custom login
You also have to:
- create the custom login page: http://www.opencms-wiki.org/wiki/Custom_Login_Page
- in your template add this code (head section) to switch authenticated users to the offline project:
CmsUser user = cms.getRequestContext().getCurrentUser(); if (!user.isGuestUser() && OpenCms.getRoleManager().hasRole(cms.getCmsObject(), CmsRole.WORKPLACE_USER)) { CmsProject cmsproject = cms.getCmsObject().readProject("Offline"); cms.getCmsObject().getRequestContext().setCurrentProject(cmsproject); } - add the users that must have the inline editing to the OpenCms Users group (this adds the correct role to your users)
- done!
