Adding php with parameters with addCss in Magento

magento

Solution

The method addItem is less restrictive. addJs and addCss checks if file exists. Try this instead :

<action method="addItem">
   <type>link_rel</type>
   <name>style.php?param=val</name>
   <params>rel="stylesheet" type="text/css"</params>
</action>

:)

Problem

I use a php file as stylesheet. This works pretty fine when there are no parameters ``` <action method="addCss"> <stylesheet>style.php</stylesheet> </action> ``` But as soon as I add a parameter to the request, Magento doesn't know anymore, that this file is in my own theme but uses the path to the default theme. Of course, as there is no file called style.php?param=val and so the common fallback is used. But how can I force Magento to use my theme, no matter if it finds the file there or not? ``` <action method="addCss"> <stylesheet>style.php?param=val</stylesheet> </action> ```

Original source