Uploaded image for project: 'Magnolia CLI'
  1. Magnolia CLI
  2. NPMCLI-132

Command "create-block"

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Labels:
      None
    • Epic Link:
    • Sprint:
      Kromeriz 124, Kromeriz 125
    • Story Points:
      5

      Description

      Creating a block requires a few files which are linked, the task is very similar to create-page or create-component.
      I propose the following command:

      mgnl create-block <blockName> [-p <path>]

      <blockName>:
      The name of the new block.

      -p <path>
      The path to the light module to add the new block to.
      If the parameter is omitted, the command must be run within an existing light module folder.

      The command should create these files:

      • <light-module>/blocks/<blockName>.yaml
      • <light-module>/templates/blocks/<blockName>.yaml
      • <light-module>/templates/blocks/<blockName>.ftl

      The defaults (prototypes) of the block definition (fields!) and the template script to render them needs discussion.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jsimak Jaroslav Simak
              Reporter:
              cmeier Christoph Meier
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: