Uploaded image for project: 'Magnolia Templating Essentials'
  1. Magnolia Templating Essentials
  2. MTE-63

Add PageTemplateDefinition to MTE

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 0.9
    • None
    • models
    • None
    • Basel 29
    • 5

      We currently do not provide any custom template definition in MTE, making it difficult for example to get started with page specific JS or CSS files.

      In the realm of the demo this is only provided in the travel-demo module providing additional jsFiles only.

      We should move this definition to MTE to enable easier access to a basic page template definition. Also providing page specific cssFiles.

      • Move info.magnolia.demo.travel.definition.PageTemplateDefinition to MTE
        • Package needs to change
      • Add possiblity to add cssFiles
      Side-note

      The code in travel-demo's travel-demo/templates/pages/areas/htmlHeader.ftl already expects cssFiles:

      [#if def.cssFiles??]
          [#list def.cssFiles as cssFile]
      <link rel="stylesheet" type="text/css" href="${cssFile.link}" media="${cssFile.media}" />
          [/#list]
      [/#if]
      

      media attribute should only be rendered when provided in the resource definition.

        Acceptance criteria

          1. basic.yaml
            0.4 kB
          2. main.ftl
            1 kB

              pmundt Philip Mundt
              pmundt Philip Mundt
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoR

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 0.25d
                    0.25d