Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-1041

Reusability: unnecessary dependencies on STK model classes

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Neutral
    • None
    • 2.0.6
    • templates
    • None

    Description

      When extending an STK template, one has to extend info.magnolia.module.templatingkit.templates.pages.STKPage if they want to add custom areas or configuration. That's fair.

      But if the custom template also needs a model, it seems unnecessary that they also have to extend info.magnolia.module.templatingkit.templates.pages.STKPageModel - because i.e htmlHeader.ftl uses pageModel.logoImageLink and pageModel.site.

      It seems to be cluttering a class that should really be about "business logic" with layout logic. Some of these methods would probably be better off in stkfn... but some cases are debatable. Just leaving this here as food for thought. (Also because there is a lot of duplication or close-but-not-quite-the-same similarity between STKPageModel and functions of stkfn.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: