Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The key for the title property is created automatically by Magnolia, you do not have to provide it. In fact Magnolia will recognize two keys, one with module name and one without it:

foobar.templates.pages.dilberts-page

templates.pages.dilberts-page

  • Line 5: If desired, you can assign a custom key.

...

Code Pro
languagejava
titleinfo.magnolia.rendering.template.RenderableDefinition (simplified)
linenumberstrue
@I18nable(keyGenerator = RenderableDefinitionKeyGenerator.class)
public interface RenderableDefinition extends NamedDefinition {

    String getId();

    @Override
    String getName();

    String getRenderType();

    @I18nText
    String getTitle();

    @I18nText
    String getDescription();

    @Deprecated
    String getI18nBasename();

    String getTemplateScript();

    Map<String, RenderableDefinition> getVariations();
}
  • Line 1:
    Javadoc
    0info.magnolia.i18nsystem.I18nable
    annotation specifies the key generator class.
  • Lines 11, 14:
    Javadoc
    0info.magnolia.i18nsystem.I18nText
    annotation marks methods that return text which should be translated.

...