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

Resources' conditionalComment is not used for javascript resources, nor for page css

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Neutral Neutral
    • 2.7.x
    • 2.0.6
    • templates
    • None
    • Yes

      In templating-kit/pages/global/htmlHeader.ftl, conditionalComment is only used when listing the theme's css resources. It should also be used for css' configured at page-template-level, as well as for all js resources.

      Here's an untested patch that should solve this. while writing the patch, I noticed that all <script> tags were enclosed in a <!-[if ! lte IE 6]><!->. I moved the closing tag for that specific script up, so it only encloses the first <script>. I'm not sure this was by design or by mistake. It'd essentially strip all scripts for IE older than 6, which is pbly not a bad thing, but would prevent the usage of other conditions for each script. This shows a technique to nest conditional comments, but I haven't tried it out: http://www.dynamicdrive.com/forums/showthread.php?17401-Nesting-IE-Conditional-Comments

      As a side question - why does info.magnolia.module.templatingkit.sites.Site have a jsFiles field, but note cssFiles ?

        Acceptance criteria

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

                Created:
                Updated:
                Resolved: