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

Multiple prototypes for creating pages and components

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Labels:
      None
    • Documentation update required:
      Yes
    • Epic Link:
    • Sprint:
      Kromeriz 123, Kromeriz 124
    • Story Points:
      5

      Description

      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
      ...
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jsimak Jaroslav Simak
              Reporter:
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: