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

Command "create-block"

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 3.0.0
    • None
    • None
    • Kromeriz 124, Kromeriz 125
    • 5

      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.

        Acceptance criteria

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

                Created:
                Updated:
                Resolved: