The 5.7 branch of Magnolia reached End-of-Life on December 31, 2023, as specified in our End-of-life policy. This means the 5.7 branch is no longer maintained or supported. Please upgrade to the latest Magnolia release. By upgrading, you will get the latest release of Magnolia featuring significant improvements to the author and developer experience. For a successful upgrade, please consult our Magnolia 6.2 documentation. If you need help, please contact info@magnolia-cms.com.
A subapp descriptor describes a subapp. A subapp is typically rendered as a tab inside an app. The descriptor defines the classes that read the configuration and implement the subapp.
Subapp descriptor
Here is an example of a main
subapp inside a helloworld
app. Create subapp configuration under the subApps
folder.
appClass: info.magnolia.ui.app.helloworld.HelloWorldApp class: info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor icon: icon-app label: Hello World subApps: main: subAppClass: info.magnolia.ui.app.helloworld.main.HelloWorldMainSubApp class: info.magnolia.ui.api.app.registry.ConfiguredSubAppDescriptor label: Hello!
Node name | Value |
---|---|
modules | |
ui-helloworld-app | |
apps | |
helloworld | |
subApps | |
main | |
class | info.magnolia.ui.api.app.registry.ConfiguredSubAppDescriptor |
label | Hello! |
subAppClass | info.magnolia.ui.app.helloworld.main.HelloWorldMainSubApp |
Properties:
| required Subapp node name. This is the internal ID of the subapp. Used to reference the subapp for example in URL fragments. |
| required, default is Subapp descriptor class that reads the configuration. The class must implement the SubAppDescriptor interface. Examples of such classes are ConfiguredSubAppDescriptor and ConfiguredContentSubAppDescriptor . Use the fully-qualified name of the class. |
| required Subapp business logic class. The class must implement the SubApp interface which displays the subapp to the user in a tab. |
| optional , default is Whether the subapp can be closed. When set to |
| optional CSS class that identifies an icon font used on the app tab. For available names see Icons. |
| optional Text or message bundle key. Displayed in the subapp tab. |
The order in which you configure subapps is important. The first subapp will be the default subapp. It is started first.
Browser subapp descriptor
subApps: browser: subAppClass: info.magnolia.ui.contentapp.browser.BrowserSubApp class: info.magnolia.ui.contentapp.browser.BrowserSubAppDescriptor
Node name | Value |
---|---|
subApps | |
browser | |
class | info.magnolia.ui.contentapp.browser.BrowserSubAppDescriptor |
subAppClass | info.magnolia.ui.contentapp.browser.BrowserSubApp |
Detail subapp descriptor
Detail subapp is also part of the content app framework. It creates and edits the content items listed in the browser subapp.
subApps: detail: subAppClass: info.magnolia.ui.contentapp.detail.DetailSubApp class: info.magnolia.ui.contentapp.detail.DetailSubAppDescriptor
Node name | Value |
---|---|
subApps | |
detail | |
class | info.magnolia.ui.contentapp.detail.DetailSubAppDescriptor |
subAppClass | info.magnolia.ui.contentapp.detail.DetailSubApp |