Summary
This is a quick post to discuss the rather simple view helper I created for rendering a Zend Framework style view file only if it exists. Generally asking the code to render a file which doesn’t exist will throw an exception. Therefore I created a wrapper for the Zend_View::render() method which determined whether the file exists and if so renders, otherwise simply returns an empty string.
Continue reading 'Zend Framework: Render If Exists'»
Computing, PHP, Web Programming, Zend Framework, Zend_View, Zend_View_Helper
|
class, framework, html, PHP, render, view, view helper, zend, Zend Framework, zend_view, Zend_View_Helper_Abstract
This may seem simple, but I was banging my head trying to create a URL in a custom view helper in Zend Framework. I have routing setup which gets the module from the sub-domain in use so I couldn’t use a simple hardcoded URL.
Continue reading 'Creating URL in Zend Custom View Helper'»
Articles, PHP, Web Programming, Zend Framework, Zend_View, Zend_View_Helper
|
custom, framework, front controller, helper, PHP, Router, view, zend, Zend Framework, Zend_View_Helper_Abstract