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

AllowedBodyClasses in BodyClassResolver.java should probably be configurable within STK?

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 1.1.1
    • concept
    • None

      In the class info.magnolia.module.templatingkit.style.BodyClassResolver.java the allowed body classes are defined:
      private static String[] allowedBodyClasses =

      { "col", "nav-col", "col-subcol", "col-subcol-equal", "col-float3", "col-float2", "nav-col-float2", "col-float2-subcol", "col-subcol-subcol" }

      ;

      If anything is configured by the user which is out of this definitions, a, error is generated in the log:
      ERROR nolia.module.templatingkit.style.BodyClassResolver: Is not an allowed body class: nav-col-subcol-subcol

      This can be very easily achieved by changing the extrasArea.columns=2 (two extras areas).
      This means in consequences, that the used can configure within a site-definition a set which:

      • This error is produced
      • No body class shows on the page
        And the only way to solve this is by subclassing the BodyClassResolver class.

      I think it makes no sense, to provide by configuration possibilities which finally drag a need to subclass.
      That's why i want to raise here the questions, whether the 'allowedBodyClasses' shouldn't be configurable somwhere (site-def or so)?
      And if not the variable should at least be protected for subclassing it better.

        Acceptance criteria

              cringele Christian Ringele
              cringele Christian Ringele
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: