ZF-3921: conditional comments for HeadScript and HeadStyle

Issue Type: Improvement Created: 2008-08-11T05:24:08.000+0000 Last Updated: 2008-12-29T18:38:10.000+0000 Status: Resolved Fix version(s): - 1.7.2 (23/Dec/08)

Reporter: Andrew Collington (amnuts) Assignee: Jon Whitcraft (sidhighwind) Tags: - Zend_View

Related issues: - ZF-4401

Attachments: - ZF-3921.patch


Conditional comments are handy not only for links but also for scripts and stylesheets. As HeadScript and HeadStyle by default only allow W3C standard attributes, you could potentially use 'conditional' in the attribute array. Then simply add the following just before the return statement in itemToString():

<pre class="literal">
        if (isset($item->attributes['conditional'])
            && (false !== $item->attributes['conditional'])) {
            $html = '';


Posted by Matthew Weier O'Phinney (matthew) on 2008-12-10T17:13:52.000+0000

Assigning to Jon Whitcraft.

Posted by Jon Whitcraft (sidhighwind) on 2008-12-12T10:44:27.000+0000

Having Ralph from Zend Review Before I post

Posted by Jon Whitcraft (sidhighwind) on 2008-12-13T06:48:55.000+0000

This was checked in with r13199 and placed into the release branch with r13200

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.