Awesome! That worked like a charm. All I had to do is:
$url = $this->_view->baseUrl() . '/css/blueprint/ie.css';
$this->_view->headLink()->appendStylesheet($url, 'screen,projection', 'IE 7');
This outputs:
<!--[if IE 7]>.....<!-- [endif] -->
Thanks!!
Nikos
--
The contents of this message may contain confidential or privileged information and is intended solely for the recipient(s). Use or distribution to and by any other party is not authorized. If you are not the intended recipient, copying, distribution or use of the contents of this information is prohibited.
$url = $this->_view->baseUrl() . '/css/blueprint/ie.css';
$this->_view->headLink()->appendStylesheet($url, 'screen,projection', 'IE 7');
This outputs:
<!--[if IE 7]>.....<!-- [endif] -->
Thanks!!
Nikos
On Thu, Aug 21, 2008 at 12:37 PM, Oscar Reales <oreales@gmail.com> wrote:
Here you got the solution:
http://surlandia.com/2008/02/22/conditional-stylesheet-using-headlink-placeholder-zend-framework/Hello all,
I am trying to integrate the Blueprint CSS framework to my application using the appendStylesheet helper.
Blueprint needs the following:
<link rel='stylesheet' href='./css/blueprint/screen.css' type='text/css' media='screen, projection' />
<link rel='stylesheet' href='./css/blueprint/print.css' type='text/css' media='print' />
<!--[if IE]>
<link rel='stylesheet' href='./css/blueprint/ie.css' type='text/css' media='screen, projection' />
<![endif]-->
My code is as follows:
$url = $this->_view->baseUrl() . '/css/blueprint/screen.css';
$this->_view->headLink()->appendStylesheet($url , 'screen,projection');
$url = $this->_view->baseUrl() . '/css/blueprint/print.css';
$this->_view->headLink()->appendStylesheet($url , 'print');
This handles the first two lines of the blueprint css requirements.
How can I add a conditional comments for the IE stylesheet? Is there a way to add the <!--[if IE]> and <![endif]-->?
Thanks!
Nikos
--
The contents of this message may contain confidential or privileged information and is intended solely for the recipient(s). Use or distribution to and by any other party is not authorized. If you are not the intended recipient, copying, distribution or use of the contents of this information is prohibited.
没有评论:
发表评论