dynamic-link-field-module

Provides an extension of the Magnolia link field

License

License

Categories

Categories

ORM Data
GroupId

GroupId

uk.co.malleusconsulting.magnolia.ui.form
ArtifactId

ArtifactId

dynamic-link-field-module
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

dynamic-link-field-module
Provides an extension of the Magnolia link field
Project URL

Project URL

https://github.com/malleusconsulting/dynamic-link-field
Source Code Management

Source Code Management

https://github.com/malleusconsulting/dynamic-link-field

Download dynamic-link-field-module

How to add to project

<!-- https://jarcasting.com/artifacts/uk.co.malleusconsulting.magnolia.ui.form/dynamic-link-field-module/ -->
<dependency>
    <groupId>uk.co.malleusconsulting.magnolia.ui.form</groupId>
    <artifactId>dynamic-link-field-module</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/uk.co.malleusconsulting.magnolia.ui.form/dynamic-link-field-module/
implementation 'uk.co.malleusconsulting.magnolia.ui.form:dynamic-link-field-module:1.0.0'
// https://jarcasting.com/artifacts/uk.co.malleusconsulting.magnolia.ui.form/dynamic-link-field-module/
implementation ("uk.co.malleusconsulting.magnolia.ui.form:dynamic-link-field-module:1.0.0")
'uk.co.malleusconsulting.magnolia.ui.form:dynamic-link-field-module:jar:1.0.0'
<dependency org="uk.co.malleusconsulting.magnolia.ui.form" name="dynamic-link-field-module" rev="1.0.0">
  <artifact name="dynamic-link-field-module" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.co.malleusconsulting.magnolia.ui.form', module='dynamic-link-field-module', version='1.0.0')
)
libraryDependencies += "uk.co.malleusconsulting.magnolia.ui.form" % "dynamic-link-field-module" % "1.0.0"
[uk.co.malleusconsulting.magnolia.ui.form/dynamic-link-field-module "1.0.0"]

Dependencies

compile (3)

Group / Artifact Type Version
info.magnolia » magnolia-core jar 5.4.5
info.magnolia.ui » magnolia-ui-form jar 5.4.5
org.mockito : mockito-core jar 2.0.98-beta

provided (1)

Group / Artifact Type Version
javax.servlet : servlet-api jar 2.5

test (3)

Group / Artifact Type Version
junit : junit jar 4.11
info.magnolia.ui » magnolia-ui-form test-jar 5.4.5
info.magnolia » magnolia-core test-jar 5.4.5

Project Modules

There are no modules declared in this project.

dynamic-link-field-module

##Description This module adds an additional link field that can dynamically discover the nodes it makes available to an editor to select from.

The primary use case for this field is where an editor is configuring a page that should only link to content from a certain area of the website. For example, a category landing page which highlights items beneath it in the website tree.

##Installation This module is available from the central Maven repository and can be installed using:

<dependency>
  <groupId>uk.co.malleusconsulting.magnolia.ui.form</groupId>
  <artifactId>dynamic-link-field-module</artifactId>
  <version>1.0.0</version>
</dependency>

##Usage The field type is uk.co.malleusconsulting.magnolia.ui.form.field.definition.DynamicLinkFieldDefinition and introduces an additional property, targetRootNodeType.

On initialisation, triggered by opening a dialog containing the new field, the ancestors of the node being edited are examined to find the closest of the given type. The path of this node is then provided to a standard Magnolia LinkFieldFactory. This, in turn, produces a link field which provides a tree from that ancestor down.

Where no node type is specified, the field defaults to mgnl:page, meeting the primary use case described above.

An example of an STK teaser dialog reconfigured to use the DynamicLinkField is shown below.

Versions

Version
1.0.0