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

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

      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.

        Acceptance criteria

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

                Created:
                Updated:
                Resolved: