I've got an Magento admin console extension that enables a model window across the entire Magento admin console. In Magento 1.7, I can include the factory default CSS file with the following
$layout->getBlock('head')->addCss('lib/prototype/windows/themes/magento.css');
However, in Magento 1.6, this file isn't in the skin folder, it's in the 'js_css' folder, and I need to use this
$layout->getBlock('head')->addItem('js_css', 'prototype/windows/themes/magento.css')
Is there an elegant, straight forward way for me to ensure this file is properly included across all versions of Magento without resorting to version sniffing and without resorting to making my own copy of the file.
I don't know if this suggestion is any better but you could check where the file exist and let that determine which method to call.