See, this is an awkward and complicated decision to make, but worth making right.
MODx comes with an .htaccess file (called ht.access) so in one respect the htaccess route is the official approach. But then that doesn’t actually get used by default - Friendly URLs are not the default setting.
You can’t really turn htcmime.php into a snippet. What the script does is serve up the .htc file having set the right headers. You could have a document with no template and the only content a snippet that did the same thing, but frankly that’s ludicrous. It is better to have htcmime.php in the same folder as the .htc file, and to advise people to switch from
behavior: url(assets/js/csshover.htc)
to
behavior: url(assets/js/htcmime.php?file=csshover.htc)
in their CSS if they need to.
So, bearing that in mind..
Quote from: davidm at Sep 19, 2006, 10:01 AM
Nothing major, but WinXP SP2 is a good share of the market and cannot (unluckily) just be ignored.
Well, there’s degrees of ignoring. Frankly, I don’t intend on having anything with a hover state that is so essential that IE6 users need to see it (no matter what SP they’re on). I’ve considered .htc, but it seems to bring more trouble than it is worth. People will notice a nasty error when they try to browse their site in a McDonald’s internet kiosk more than they will notice the absence of a hover effect. I therefore avoid using it in my templates.
It is worth pointing out that presently only Minimal Template seems to include the line. Which, frankly should probably be taken out of Minimal along with the reference to an RSS feed from [~11~] which is just plain stupid on single-page installs.
That said,
I think the best MODx solution would be a plugin that added the line (configurable between using .htc or .php) as an inline style in the header. Given that we go to the trouble of including the .htc file in the distribution it would make sense for such a plugin to be part of the optional extras added during installation. (Would a second plugin for the manager be useful too?)