Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.
JCR browser is a Magnolia tool that allows you to view and edit content and associated configuration at the repository level. It allows you to see details that are not readily visible in a specific app's treeview.
A JCR browser displays the content of one workspace at a time. A JCR browser for the website
workspace is preconfigured. You can configure a custom JCR browser to display any workspace.
The Configuration app is essentially a JCR browser that displays the config
workspace. This is where configuration for Magnolia core and all modules is stored. Configuration specific to Magnolia core is in the server
folder. Modules store their configuration in the modules
folder.
The website JCR browser is accessible in Tools > JCR. The browser shows the content as it is stored in the JCR and is useful for looking at details that you would not see in the Pages app.
The website
workspace contains pages, areas and components, and is organized according to the site hierarchy.
Here's a comparison of the /demo-project/news-and-events/news-overview/news03
on the page and in the JCR. Only two components, the Page Header component in the intro
area and Text and Image component in content
area, have been added on the page.
news03
is the page node. It contains area nodes and page properties. The folder tree hierarchy above it is the same as you would see in the Pages app treeview: /demo-project/news-and-events/news-overview
./content
area node contains a single stkTextImage
news component starting with the words "The main part of news...". The property node names match the field names configured in the stkTextImage
dialog in STK > Dialog Definitions /components/content/stkTextImage/form/tabs/tabText/fields
. hideInNav
setting is from the stkNewsProperties
properties dialog. The node name matches the corresponding field configured in STK > Dialog Definitions /pages/news/stkNewsProperties
.stkNewsInfo
intro dialog. The node names match the corresponding fields configured in STK > Dialog Definitions /pages/news/stkNewsIntro.
The Page Header component is considered part of the page. For more information see intro area.Node name | Value |
---|---|
news-overview | |
news03 | |
content | |
0 | |
text_files | |
image | jcr:e788cc15-8e57-4220-be17-5b9d7ee17c88 |
imageCaption | Staircase |
imageCopyright | Copyright: Magnolia |
imageLocation | left |
text | <p>The main part of the news starts...lingues.</p> |
metaNavigation | |
comments | |
extras | |
promos | |
base | |
abstract | This is the abstract for the news page "Another News"... |
author | M.Miller |
date | 21 Nov 2008 1:00:00 AM |
hideInNav | false |
kicker | Et va esser tam simplic |
location | Basel |
title | Another News |
You can edit and add content in the JCR browser, but should always do this with caution because you are working a repository level. In some cases, the browser offers a quicker alternative to working in the page editor in the Pages app. There are also certain things that you can do in the browser that are not possible in the editor. Here are a few suggestions:
While it is possible to move components from one page area to another, this is not the best practice solution. For seamless publishing your page content should always comply with the options available in the template.
Publishing in the Website JCR browser is different from publishing in the Pages app:
You can configure a JCR browser to display any Magnolia workspace. The most efficient way is to extend the Configuration app and change important properties. This is how the websiteJcrBrowser
is configured. You can find these configurations at /modules/ui-admincentrral/apps/configuration
and /websiteJCRBrowser
.
In Magnolia 5.3+ the nodes and properties discussed below are configured in the content connector definition (
contentConnector
node) and in Magnolia 5.2+ they are configured in the workbench definition (
workbench
node).
Important nodes and properties to note and possibly change:
workspace
: Set this property to the workspace you want to browse.nodeTypes
: Define the node types to display in the browser. Each type has it's own configuration node. Add and change node types and behavior as necessary.
mgnl:conentNode
and mgnl:content
node types,jcr:
and mgnl:
. This is not configurable.mgnl:contact
, mgnl:asset
and mgnl:category
.jcr:content
, for example for the imaging
workspace, add mgnl:resource
node type.nt:base
is extremely dangerous because it enables editing of jcr:system
, jcr:versionStorage
etc. nodes. This can ruin the workspace completely.strict
: This property is configured per node type. In the Configuration app it is set to true
for both mgnl:conentNode
and mgnl:content
to prevent node subtypes displaying in list and tree view. In the websiteJcrBrowser
configuration it is reversed (set to true
) in order to display mgnl;page
, mgnl:area
and mgnl:component
subtypes. Use this property to suit your circumstances.includeProperties
: Defines whether to display property nodes. In the Configuration app this property is set to true
. Set it to false
to hide properties in the browser. mgnl:created
and mgnl:lastModified
properties are filtered (not displayed) regardless of the setting.includeSystemNodes
: false
. Displays nodes used by the system such as nodes internal to the operations of the JCR implementation. Use this property with caution. It is only required to configure a browser for the dam
and imaging
workspaces.label
: Labels cannot be loaded from a message bundle when you extend an app. It is necessary to manually add label
properties. See
-
MAGNOLIA-5562Getting issue details...
STATUS
and Adding labels for more.This example below shows you how to adapt the websiteJcrBrowser
configuration to browse the contacts
workspace. You can download the contactsJcrBrowser
configuration XML (download 5.3, download 5.2) and import it instead of configuring from scratch.
In /modules/ui-admincentral/apps
duplicate the websiteJcrBrowser
node and rename it contactsJcrBrowser
. Both websiteJcrBrowser
and the new contactsJcrBrowser
extend the the configuration
app.
In 5.3 the workspace
property and node type configuration moved from the workbench definition to the content connector definition.
To configure the content connector in 5.3+ in
/contactsJcrBrowser/subapps/browser/contentConnector
:
workspace
property to contacts
./nodeTypes/mainNodeType
add a name
property and set it to mgnl:contact
.Node name | Value |
---|---|
modules | |
ui-admincentral | |
apps | |
configuration | |
websiteJcrBrowser | |
contactsJcrBrowser | |
subapps | |
browser | |
actionbar | |
contentConnector | |
nodeTypes | |
mainNodeType | |
name | mgnl:contact |
strict | false |
folderNodeType | |
strict | false |
includeSystemNodes | false |
path | / |
workspace | contacts |
extends | /modules/ui-admincentral/apps/configuration/subApps |
appClass | info.magnolia.ui.contentapp.ContentApp |
class | info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor |
To configure the workbench in 5.2+ in
/contactsJcrBrowser/subapps/browser/workbench
:
workspace
property to contacts
./nodeTypes/mainNodeType
add a name
property and set it to mgnl:contact
.Node name | Value |
---|---|
modules | |
ui-admincentral | |
apps | |
configuration | |
websiteJcrBrowser | |
contactsJcrBrowser | |
subapps | |
browser | |
actionbar | |
workbench | |
nodeTypes | |
mainNodeType | |
name | mgnl:contact |
strict | false |
folderNodeType | |
strict | false |
includeSystemNodes | false |
path | / |
workspace | contacts |
extends | /modules/ui-admincentral/apps/configuration/subApps |
appClass | info.magnolia.ui.contentapp.ContentApp |
class | info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor |
In the Configuration app, the addNode
action operates on the mgnl:contentNode
node type. See Action availability for more.
To ensure that the addNode
action works correctly for mgnl:contact
node types in /contactsJcrBrowser/subapps/browser
:
actions
content node with an extends
property set to /modules/ui-admincentral/apps/configuration/subApps/browser/actions
.actions
, add an addNode
content node with a nodeType
propety set to mgnl:contact
.Node name | Value |
---|---|
contactsJcrBrowser | |
subapps | |
browser | |
actionbar | |
contentConnector | |
actions | |
addNode | |
nodeType | mgnl:contact |
extends | /modules/ui-admincentral/apps/configuration/subApps/browser/actions |
extends | /modules/ui-admincentral/apps/configuration/subApps |
appClass | info.magnolia.ui.contentapp.ContentApp |
class | info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor |
Like the addNode
action, the nodes
group in the action bar in the Configuration app is available for mgnl:contentNode
node types. See Action bar availability for more.
To ensure that the nodes
action is available for mgnl:contact
node types in /contactsJcrBrowser/subapps/browser/actionbar/
extends
property and set the value to /modules/ui-admincentral/apps/configuration/subApps/browser/actionbar
./sections
add a nodes/availability/nodeTypes
content node structure with an arbitrarily named property with the value set to mgnl:contact
.Node name | Value |
---|---|
contactsJcrBrowser | |
subapps | |
browser | |
actionbar | |
sections | |
root | |
nodes | |
availability | |
nodeTypes | |
contacts | mgnl:contact |
extends | /modules/ui-admincentral/apps/configuration/subApps/browser/actionbar |
Add the following label
properties (with supporting content nodes, where required) in /modules/ui-admincentral/apps/contactsJcrBrowser
:
/label
. Displays in the menu in the app launcher. You can also optionally add an icon
property set to icon-jcr-app
to render the icon in the tile. See Icons for a list of icon names./subapps/browser/label
. Displays above the workbench./subapps/browser/actionbar/sections
:/root/label
= Contacts
. Displays when no node is selected./properties/label
= Property
. Displays when a property is selected./nodes/label
= Content node
. Displays when a content node is selected./folders/label
= Folder
. Displays when a folder is selected./multiple/label=Multiple Items
. Displays when multiple mixed items, for example property and content node, are selected.Node name | Value |
---|---|
contactsJcrBrowser | |
subapps | |
browser | |
actionbar | |
sections | |
root | |
label | Contacts |
properties | |
label | Property |
nodes | |
availability | |
label | Content node |
folders | |
label | Folder |
multiple | |
label | Multiple items |
extends | /modules/ui-admincentral/apps/configuration/subApps/browser/actionbar |
contentConnector | |
label | Contacts JCR Browser |
extends | /modules/ui-admincentral/apps/configuration/subApps |
appClass | info.magnolia.ui.contentapp.ContentApp |
class | info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor |
icon | icon-jcr-app |
label | Contacts JCR Browser |
Add the new app to the app launcher. In /modules/ui-admincentral/config/appLauncherLayout/groups/tools/apps/
add a new node named contactsJCRBrowser
. You can add it to another group if you like.
Node name | Value |
---|---|
ui-admincentral | |
config | |
appLauncherLayout | |
groups | |
edit | |
manage | |
data | |
tools | |
apps | |
websiteJcrBrowser | |
... | |
contactsJcrBrowser | |
permissions |
Refresh the app launcher. You can do so by adding the restartApplication
request-parameter to the URL or refreshing your browser.
Here's the new Contacts JCR Browser.
This example shows you how to configure node types in the 5.3+ content connector and
5.2+ workbench to browse the
dam
workspace. The purpose is to demonstrate node types in the DAM. It is not a fully usable example because assets can only be uploaded in the Assets app. But, you can for example, use it to view and amend properties.
The example adapts the websiteJcrBrowser
configuration to browse the dam
workspace.
In /modules/ui-admincentral/apps
duplicate the websiteJcrBrowser
node and rename it damJcrBrowser
. Both websiteJcrBrowser
and the new damJcrBrowser
extend the the configuration
app.
See DAM workspace structure for more about dam
node types, Icons for a list of icon names and Configuring a custom JCR browser above for a description of each property..
To configure the content connector in 5.3+ in
/damJcrBrowser/subapps/browser/contentConnector
:
/workspace
property to dam
./includeSystemNodes
property to true
./includeProperties
property and set it to true
.nodeTypes/mainNodeType
and /folderNodeType
nodes. We will add replacement nodes.assetNodeType
, folderNodeType
and assetResourceNodeType
, each with icon
, name
and strict
properties. Set the values as shown below.Node name | Value |
---|---|
ui-admincentral | |
apps | |
damJcrBrowser | |
subapps | |
browser | |
contentConnector | |
nodeTypes | |
assetNodeType | |
icon | icon-link-document |
name | mgnl:asset |
strict | true |
assetFolderNodeType | |
icon | icon-folder-l |
name | mgnl:folder |
strict | true |
assetResourceNodeType | |
icon | icon-file-image |
name | mgnl:resource |
strict | false |
extends | /modules/ui-admincentral/apps/configuration/subApps |
appClass | info.magnolia.ui.contentapp.ContentApp |
class | info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor |
See DAM workspace structure for more about dam
node types, Icons for a list of icon names and Configuring a custom JCR browser above for a description of each property..
To configure the workbench in 5.2+ in
/damJcrBrowser/subapps/browser/workbench
:
/workspace
property to dam
./includeSystemNodes
property to true
./includeProperties
property and set it to true
.nodeTypes/mainNodeType
and /folderNodeType
nodes. We will add replacement nodes.assetNodeType
, folderNodeType
and assetResourceNodeType
, each with icon
, name
and strict
properties. Set the values as shown below.Node name | Value |
---|---|
ui-admincentral | |
apps | |
damJcrBrowser | |
subapps | |
browser | |
workbench | |
nodeTypes | |
assetNodeType | |
icon | icon-link-document |
name | mgnl:asset |
strict | true |
assetFolderNodeType | |
icon | icon-folder-l |
name | mgnl:folder |
strict | true |
assetResourceNodeType | |
icon | icon-file-image |
name | mgnl:resource |
strict | false |
extends | /modules/ui-admincentral/apps/configuration/subApps |
appClass | info.magnolia.ui.contentapp.ContentApp |
class | info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor |
Here's the DAM JCR browser after configuring actions and the actionbar, and adding label properties as demonstrated in the Contacts example above.