This is the old extension based on CORA. Consider using the newer version, which uses RemoteSDK.
Magnolia:connect is a Magnolia extension which allows you to embed assets from CELUM DAM directly into your Magnolia CMS pages.
<repository>
<id>brix.external</id>
<name>brix external repository</name>
<url>https://maven.brix.ch</url>
</repository>
<servers>
...
<server>
<id>brix.external</id>
<username>your-username</username>
<password>your-password</password>
</server>
...
</servers>
<dependency>
<groupId>ch.brix.magnolia</groupId>
<artifactId>celum-dam-connector</artifactId>
<version>2.2.1-5.6</version>
</dependency>
Configure the following properties in Magnolia:
Your license key for the module (provided by brix)
The API key of the CORA authentication profile
The Node Type ID you want to use with Magnolia:Connect
The code of the locale to use for the node hierarchy
A comma separated list of IDs of the information fields which should be loaded with the asset
Note: The provided component celum-simple-image is only an example, it is strongly recommended to implement your own custom component.
Since version 2.2.x it is possible to load and display CELUM information field values in your Magnolia components.
First of all you have to configure which information fields should be loaded with the asset with the property
/modules/celum-dam-connector/config/includedInformationFields
(see Configuration section for details).
You can now call the method getInformationFieldValue(long informationFieldId)
on the ch.brix.magnolia.celum.integration.model.CelumAsset
instance, which should be available in your component model.
This will return an instance of type ch.brix.magnolia.celum.integration.model.informationfield.value.CelumInformationFieldValue
or null
if the requested information field value is not available on the asset.
The type of the value
property depends on the type of the information field in CELUM:
number
=> java.lang.Long
double
=> java.lang.Double
checkbox
=> java.lang.Boolean
date
=> java.util.Calendar
text
/ textarea
=> java.lang.String
localizedtext
/ localizedtextarea
=> ch.brix.magnolia.celum.integration.model.informationfield.value.LocalizedValue
dropdown
=> ch.brix.magnolia.celum.integration.model.informationfield.value.DropDownValue
nodereference
=> java.util.Set<ch.brix.magnolia.celum.integration.model.informationfield.value.NodeReference>
Instead of working with the typed value
property you can also use the convenience methods getValueAsString()
and getLocalizedValue(String localeCode)
/ getLocalizedValue(Locale locale)
. The getValueAsString()
method will return
a best-effort String representation of the value, while the getLocalizedValue()
methods try to return the value in the specified locale –
for unlocalized types (number
, double
, checkbox
, date
, text
, textarea
) they will return the same result as getValueAsString()
.
CELUM ContentHub | Magnolia | Magnolia Connect |
---|---|---|
18.12+ | 5.6 | 2.2.2-5.6 |
18.12+ | 5.7 | 2.2.2-5.7 |
18.12+ | 6.1 | 2.3.0-6.1 |