Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Allow character substitution for link text in label #11

Open
wants to merge 1 commit into
base: master
from

Conversation

@eliashaeussler
Copy link

eliashaeussler commented Oct 14, 2019

This commit introduces the possibility to insert the link text of a linked checkbox within the elements' label. In order to make use of this feature, the insert position for the checkbox link needs to be provided for the label.

Example:

type: LinkedCheckbox
identifier: linkedcheckbox-1
label: 'I accept the %s.'
properties:
  pageUid: '67'
  linkText: 'terms and conditions'

This will result in the following label:

<label>
  I accept the
  <a href="/index.php?id=67" target="_blank">terms and conditions</a>.
</label>

Additionally, one can provide custom typolink configuration which will be passed to the ContentObjectRenderer when building the link:

renderingOptions:
  linkConfiguration:
    # add custom configuration here
    no_cache: 1

To override the default link target, one can provide an empty value for the configuration key renderingOptions.linkConfiguration.parameter:

renderingOptions:
  linkConfiguration:
    # this will unset the default link target (_blank)
    parameter: ''

Related: #5

This commit introduces the possibility to insert the link text of a
linked checkbox within the elements' label. In order to make use of this
feature, the insert position for the checkbox link needs to be provided
for the label.

Example:

  type: LinkedCheckbox
  identifier: linkedcheckbox-1
  label: 'I accept the %s.'
  properties:
    pageUid: '67'
    linkText: 'terms and conditions'

This will result in the following label:

  <label>
    I accept the
    <a href="/index.php?id=67" target="_blank">terms and conditions</a>.
  </label>

Additionally, one can provide custom typolink configuration which will
be passed to the ContentObjectRenderer when building the link:

  renderingOptions:
    linkConfiguration:
      # add custom configuration here
      no_cache: 1

To override the default link target, one can provide an empty value for
the configuration key `renderingOptions.linkConfiguration.parameter`:

  renderingOptions:
    linkConfiguration:
      # this will unset the default link target (_blank)
      parameter: ''

Related: #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.