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

Command "create-block"

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Neutral
    • 3.0.0
    • None
    • None
    • Kromeriz 124, Kromeriz 125
    • 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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: