Enonic Market Enonic Market
Optionlink icon

Optionlink

Simplify link handling to content, attachments, email or external urls in content types and parts.

Screenshots

This library includes an Optionlink contenttype, which can be used to create a Optionlink content that can be used in other parts - and it can also be added as a macro in a HtmlArea. This can be used to achieve links to other content with added parameters or anchor, which is not possible in todays HtmlArea (Enonic XP 6.9.3)

It also includes a OptionlinkSelector macro. This enables you insert a macro inside a HtmlArea and select a Optionlink contenttype which is rendered by using the included fragment /site/fragments/openxp/optionlink.html. The optionlink text can be overridden for each macro that is inserted.

There are two mixins included that can be used in contenttypes to give the editor the option of linking to either content, attachment, email or url. One mixin with a separate input for link text with fallback to using displayName - and one without link text. The latter is useful if you are creating a clickable call-to-action type box without its own link text.

Releases

  1. 1.0.2

    • Add link css classes
    • Compatibility:
      • 6.8.0
  2. 1.0.1

    • Change email to handle missing parameters
    • Compatibility:
      • 6.8.0
  3. 1.0.0

    • Initial version
    • Compatibility:
      • 6.8.0

Comments

Download Optionlink

An XP library is normally included in your application through the Gradle build script like this:

dependencies {
    include 'openxp.lib:optionlink:1.0.2'
}
repositories {
    maven {
         url 'http://repo.enonic.com/public/'
    }
}

Download the source code for Optionlink

Documentation for Optionlink