Set supported markups
We can set supported markups on modifiable instances that implement the ModifiableMarkupCapable interface.For example, these can be the following:
- ModifiableContentPage
- ModifiableContentLabel
- ModifiableContentURL
For content nodeso that is content pages, content labels, and content URLs, set a supported markup. Otherwise they will not show in the read-only model. To set the supported markups for a resource:
- Obtain a modifiable instance of the resource for which to set supported markups.
- Use the appropriate methods of the ModifiableMarkupCapable interface to set supported markups.
For example, to set a markup, use the addMarkup method.
Example - Setting a supported markup on a layout control (error handling omitted):
// obtain markup list final MarkupList markupList = ...; // obtain modifiable instance of a layout control final Modifiable modifiable = lmController.getModifiableNode(control); // obtain markup object Markup markup = markupList.getByName("html"); // set markup ((ModifiableMarkupCapable) modifiable).addMarkup(markup);For more detail about the markup list in the first line of the example and how to obtain it refer to Obtaining a model from the portal.
Parent: Modify properties
Related:
Set titles and descriptions
Set unique names
Set metadata
Set the orientation for layout containers
Set portlet preferences
Set flags
Set themes
Set URLs