prav_crownpeak
New Creator

How to use format template inside link template

Hello  All,

I want to use format template inside link template, If would more specifically I want to use sup-script for format template inside link template.

Output example - <a, href="www.example.com"> Sample text with <sup>sup-script-text</sup></a>

0 Kudos
2 Replies
bIT_sosswald
Returning Responder

Hi...

Two possibilities here:

  1. If you know exactly what to format during development, then just use a CMS_RENDER. This should be done, when the Content that should be formatted is maintained in a separate input component.
  2. If the editor should define what should be formatted use a CMS_INPUT_DOM with configured format templates as an input component. So the editor can define which parts of the content should be formatted in which way.

Greetings
Sandro

0 Kudos
hoebbel
Crownpeak employee

Hello prav,

a short comment on Sandro's solution #2. If you use a CMS_INPUT_DOM input component for the link text, it cannot be displayed in the surrounding input component (e.g. CMS_INPUT_LINK or CMS_INPUT_DOM). To define this display text, an input component must be selected on the properties tab. CMS_INPUT_DOM is not supported here.
In this case, you should either write a value service that transfers the content of the DOM to a CMS_INPUT_TEXT input component or offer a corresponding input component that the editor uses for the display. Of course, this is only relevant if the display of the link text is required in the external input component.

Best regards
Holger

0 Kudos