[MGNLSTK-1039] Resources' conditionalComment is not used for javascript resources, nor for page css Created: 05/Dec/12  Updated: 02/Jul/18  Resolved: 02/Jul/18

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: templates
Affects Version/s: 2.0.6
Fix Version/s: 2.7.x

Type: Bug Priority: Neutral
Reporter: Magnolia International Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File MGNLSTK-1039.patch    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Date of First Response:

 Description   

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 ?



 Comments   
Comment by Jan Haderka [ 02/Jul/18 ]

STK have been deprecated in September 2017. As part of this project nearing end-of-life, we are not planning to fix any of the existing issues except for the critical security issues. For more details, please consult documentation.

Generated at Mon Feb 12 07:32:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.