Goals

  • To be able to decorate definitions

Results

  • You will decorate the Pages App in AdminCentral with a new label

Tasks / Procedure

  1. Visualize the goal.

    1. The goal is to change the label of the Pages App to your own desired label:

      Old labelNew label

  2. Create the appropriate decorations path to the pages app definition:

    1. Achieve this structure in your file system:

  3. Decorate the Pages App definition.

    1. Open your newly created pages.yaml.
    2. Paste the following:

      label: Pages Changed

      HINT: Try to define your own desired label.

  4. Check your work.

    When decorating apps, logging out from the Author Instance and either logging back in again or requesting the page with the query parameter ?restartApplication is a necessary step.

    1. Logout from your Author Instance and login again.
    2. Your Pages App label should be changed now:
  5. Make your module dependents on the 'pages' module.

    Understand: In a real project you should make your light module being dependent on the 'pages' module as you are decorating it.

    Operate in the light module 'training-templating-essentials' in the file system.

    1. Navigate to the module descriptor:
      /training-templating-essentials/module.yaml
       
       

    2. Add the dependency into the module descriptor:

      version: 5.5.7

      dependencies:

        training-templating-foundation:

          version: 5.5.7/*

        pages:

          version: 5.5.6/*

  6. (challengeaccepted) Try to change the icon on the Pages App (optional).

          



  • No labels