You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Magnolia stores content in the magnolia repository. The repository is further divided into workspaces.

List of workspaces

Workspaces in the magnolia repository:

WorkspaceWhat it containsHow to view itCreated by
categoryCategories assigned to content.Categories appCategorization module
configConfiguration for Magnolia and all modules.Config appMagnolia
contactsSample contacts used in the Contacts app.Contacts appContacts module
damDigital asset management system storage for images and video.Assets appDigital Asset Management module
forumPage comments and forum posts.Forums appForum module
googleSitemapsSitemap dataGoogle Sitemap app Google Sitemap module
imagingDynamically created images used in teasers.JCR BrowserImaging module
keystorePasswords managed by the Passwords manager module.JCR browserPassword manager module
marketing-tagsMarketing tags – snippets of code inserted on Web pages.Marketing Tags appMarketing Tags module
messagesMessages such as publication requests.Pulse AdminCentral module
MgnlSystemSystem information for Magnolia internal use.

MgnlVersionVersioning information for Magnolia internal use.

profilesUsage metrics acknowledgement status.

JCR Browser

AdminCentral module
resourcesCSS files, JavaScript filesResources appResources module
rssRSS feedsFeeds appRSS Aggregator module
scriptsGroovy scriptsGroovy appGroovy module
storiesSample blogposts used in the Stories app.Stories appStories app
tagsContent tags – keywords or terms assigned to an item of content.Tags appContent Tags module
tasksTasksTasks appTask Management module
templates(typically nothing, legacy workspace for in-place templates)JCR BrowserIn-place Templating module
toursTours of the travel demo.Tours appTours module
usersSystem, admin and public users.Security appMagnolia
userrolesUser roles and ACLs.Security appMagnolia
usergroupsUser groups.Security appMagnolia
visitorsVisitor information for GDPR compliance.Visitors appMagnolia
websiteWeb pages, areas and components.Pages appMagnolia

(info) In Magnolia we sometimes refer to a workspace as a "repository" for historical reasons. But it really is a workspace.

Adding a custom workspace

With Magnolia Content Types

By utilizing the Magnolia Content Types module you can define custom JCR content types and workspaces within light modules.

Defining content types within light modules can be accomplished on a running Magnolia system without redeploying the WAR file of your Magnolia instances and without restarting the instance or a module. This makes it a perfect approach if you have a Magnolia Cloud subscription package.

In just one YAML file you can define a JCR workspace, a node type and namespaces.

Example

Error rendering macro 'code-pro'

Error 401 retrieving server data from URL. User is not authorized to perform the request.

Line 2: When the definition item is loaded, and if there is no workspace registered by the given name and the autoCreate property is set to true, the system will register the workspace.

For further details about the ways to define a JCR workspace and node types please refer to:

With a Magnolia Maven module descriptor

To add your own workspace:

  1. Create a module descriptor.
  2. Add a repositories section, a workspaces section, and register your workspace inside it.
  3. Optional: To register custom node types, add a nodeTypeFile section and provide a relative path to the XML file that defines the node types.

Example: The Contacts app module registers a workspace named contacts in the magnolia repository. It also registers a custom node type which is defined in a separate XML file. This is an abbreviated snippet from the complete Contacts app module descriptor.

contacts.xml module descriptor
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module SYSTEM "module.dtd">
<module>
  <name>contacts</name>
  <displayName>Contacts App</displayName>
  <description>Contacts App</description>
  <version>${project.version}</version>

  <dependencies>
    <dependency>
      <name>ui-admincentral</name>
      <version>5.1/*</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <name>magnolia</name>
      <workspaces>
        <workspace>contacts</workspace>
      </workspaces>
      <nodeTypeFile>/mgnl-nodetypes/magnolia-contacts-nodetypes.xml</nodeTypeFile>
    </repository>
  </repositories>
</module>

Naming the workspace

Magnolia uses a defined workspace name also for creating a backend database table, which means that you must follow table naming rules for your database.

In H2, the default JCR persistency layer in Magnolia 5.5+, the name (non-quoted)

  • Must begin with a character from the A-Z range or with an undescore character.

In case of the Derby database, which was the default JCR persistency layer before the release of Magnolia 5.5, the ordinary identifier (i.e. the non-quoted name)

  • Must begin with a letter and, contain only letters, underscore characters (_), and digits. 
  • The permitted letters and digits include all Unicode letters and digits, but Derby does not attempt to ensure that the characters in identifiers are valid in the database's locale.

For more information, see also

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels