Zend Framework

Zend_View::javascript(), Zend_View::css()

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.5.0
  • Component/s: Zend_View
  • Labels:
    None

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:
<script type="text/javascript" src="/js/jquery.js"/>

<?php echo $this->css('site.css');?>
outputs:
<link rel="stylesheet" type="text/css" media="screen" href="/css/site.css"/>

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

Activity

Hide
Matthew Weier O'Phinney added a comment -

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.

Show
Matthew Weier O'Phinney added a comment - 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.
Hide
Luke Crouch added a comment -

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?

Show
Luke Crouch added a comment - 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?
Hide
Jon Whitcraft added a comment -

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

Show
Jon Whitcraft added a comment - Isn't this already one with the inclusing of the Head* view helpers?
Hide
Matthew Weier O'Phinney added a comment -

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.

Show
Matthew Weier O'Phinney added a comment - 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.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: