We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26352
    • 21 Posts
    Hi,
    Longtime listener, first-time poster.

    I’m reworking an older layout to work in MODx, but am having a hard time getting the IE conditional comments to work.

    If I use the standard conditional comments code in the body of my template, it works beautifully. But as soon as I put it in the head of my document, (via a chunk called — for now — "headChunk"), it’s not seen by my template. I’ve tried changing the path a few times ... but it SHOULD match the path of the regular "link" tag, shouldn’t it?

    Anyway, it’s version 1.0.3 I’m using. I’d appreciate any tips or tricks the community has discovered about using IE comments in a typical workflow.

    Thanks in advance,
    Gary
      • 3749
      • 24,544 Posts
      MODx is completely agnostic with respect the HTML and CSS so there’s no question that it will work (if it worked before).

      One solution is to make sure you have this in the <head> section of your template:

      <base href="[[!++site_url]]" />


      and make all paths relative to the MODx root.

      Another solution, is to put a snippet tag in the template for a snippet that injects the code using one of the functions listed on this page:

      http://rtfm.modx.com/display/revolution20/modX.regClientCSS

      Personally, I would just put the code in the template or in the chunk itself rather than messing with paths.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting