Uploaded image for project: 'Blossom'
  1. Blossom
  2. BLOSSOM-1

Template annotation should allow specifying "class"

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.1.1
    • None
    • None
    • None
    • Yes

      Transferred from Sourceforge

      Original description:

      Magnolia templates support a node named "class" that contains the fully qualified class name to be instantiated for that particular template. This is useful, for example, if you want to override the default isAvailable() method.

      The Blossom @Template annotation should allow specifying this value and subsequently configuring it on the blossom generated template.

      Followup comments:

      Good suggestion, though even cooler would be to have isAvailable() directly
      on the controller.

      For now you can subclass DefaultBlossomTemplateRegistry and overload
      writeTemplateDefinition() to add the custom properties that you need.

      Replace <blossom:configuration /> with

      <bean class="se.issi.magnolia.module.blossom.BlossomConfiguration">
      <property name="templateRegistry">
      <bean class="some.package.MyCustomTemplateRegistry" />
      </property>
      </bean>

        Acceptance criteria

              tmattsson Tobias Mattsson
              tmattsson Tobias Mattsson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: