Context Editing Mode
The context editing mode aims to facilitate the administration of portal content, so that the content and interfaces have icons that allow editing their content in a more practical and intuitive way.
Usage
In order to perform context editing, the user needs to be in context editing mode, which is part of the Publisher profile.
If not already in it, the user needs to log in. For that, see Publisher Profile.
There are two types of context editing: interface instance editing and content editing. In the first, editing options related to the interface instance (and its contents) will be displayed. In the second, editing options related to the content itself will be shown.
When in context editing mode, the contents and interfaces that have been marked for context editing will be highlighted with a square icon in the upper left corner, as can be seen below:
By left-clicking on the interface instance icon, an appropriate menu is displayed, as follows:
Similarly, by left-clicking on the content marking, an appropriate menu is displayed, as follows:
By clicking on an interface instance, the publisher can Add or Manage content. By clicking on a content, the publisher can Add, Edit or Manage content. The "Manage Content" option redirects the publisher to the most appropriate administration interface for the interface instance, provided it is instantiated and can be found. The "Add" option opens a popup with the interface instance if it is "runtime only" (see servicedefinition.xsd) or redirects to the most appropriate add interface instance, otherwise. The "Edit" option resembles the "Add" option.
Default Behavior
By default, interface instance icons are automatically added to elements containing an interface instance, and content icons are added to elements that have an href attribute (link) in the standard link format for detail interface (receiving a lumItemId parameter containing the identifier of the linked content). When it identifies that an item (interface instance or content) has an icon, the tool checks which menu items the user would have access to (according to their permissions) and automatically removes those items that the user would not have permission to execute.
Disabling
The context editing functionality can be disabled at three different levels: at the interface level (see servicedefinition.xsd), at the service instance level (see Editing Service Instance Properties) and at the interface instance level (see Customizing Interface and/or Service Instance). Context editing must be disabled at one of the three levels for it not to be enabled.
Customizing Fragment Recognition for Context Editing Mode
When an interface instance is rendered in context editing mode, the portal automatically includes some attributes in the HTML that are used to identify the available context edits. The included attributes are:
lumis:interface-instance
: identifies the interface instance that rendered a fragment of the page. The value of this attribute is the identifier of the interface instance. It is automatically included in the page element surrounding the rendering of the interface instance.lumis:content
: identifies a content to which a fragment of the page refers. The value of this attribute is the identifier of the content (contentId). It is automatically included in links (elements <a>) that reference a content through the lumItemId parameter.
These attributes are not automatically included for an interface instance if context editing for the interface instance is disabled, whether because it was disabled at the interface, service instance, or interface instance level.
The markup lumis:interface-instance
is not automatically included if the interface rendered any lumis:interface-instance
attribute. This allows the interface to customize the location where the lumis:interface-instance
markup will be placed if necessary. You can also use lumis:interface-instance=""
as a way to disable its automatic inclusion.
The markup lumis:content
is not automatically included if the interface rendered any lumis:content
attribute. This allows the interface to manually define the parts of its rendering that correspond to some content. You can also use lumis:content=""
as a way to disable its automatic inclusion.