ZF-2161: Zend_View::javascript(), Zend_View::css()

Description

Not sure if this is possible (to discern locations of javascript and/or css files from Zend_View), but here are a couple use-cases describing what these methods might do:

<?php echo $this->javascript('jquery.js');?> outputs:

<?php echo $this->css('site.css');?> outputs:

Unsure if there should be conventional defaults (convention of document_root/ or whatever)?

Comments

Not settng a release for this, as I want more discussion/votes before committing to it. Regardless, if implemented, these would be as view helpers, not as direct methods of Zend_View, and most likely would either need settings in the Registry for the locations, or require the user to pass in the base paths.

ah yes ... I think view helpers is a great idea.

is there a conventional default ZF directory/file layout yet? so we could set defaults in a registry setting for these?

Isn't this already one with the inclusing of the Head* view helpers?

This functionality, except for the explicit directory structure, is now part of the Zend_View Enhanced view helpers, specifically the headLink(), headStylesheet(), and headScript() helpers.