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

Multiple prototypes for creating pages and components


    • Icon: Story Story
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 3.0.0
    • None
    • None
    • Yes
    • Kromeriz 123, Kromeriz 124
    • 5

      Option to define multiple 'prototypes' (currently there is one for page and one for component) and then be able to create new page or component from (optionally) given template. still use default one if there is no attribute.

      Current default component template with 5-6 most used fields is super useful, but sometimes I am missing option to create empty component without dialog. simply just component definition and empty ftl...

      maybe command like:

      mgnl create-component something --prototype empty

      To specify:
      Exact syntax.

      Note - eventually it would also be nice to have a prototype for light-modules, but that can come later.

      Implemented as:
      This is a breaking change, any prototypes that developers have implemented they will need to migrate to the new structure.

      Structure becomes:

      – mgnl-cli-prototypes
      +--- components
      +----- _default
      +------- definition.yaml
      +------- dialog.yaml
      +------- template.ftl
      +----- empty
      +------- definition.yaml
      +------- dialog.yaml
      +------- template.ftl
      +--- pages

        Acceptance criteria

              jsimak Jaroslav Simak
              czimmermann Christopher Zimmermann
              0 Vote for this issue
              4 Start watching this issue


                  Task DoD