|
|||
|
After following a few tutorials and books I am making my 1st attempt at making a ZF application.
What I am trying to do is add in the Year to my copyright notice into my footer.phtml that I am rendering as a partial in my default layout such as this : © 2008 Company name I have used Zend_Date to generate the year but how do I get the variable into a controller that will be used by the footer.phtml across all my default/frontend views ? Any help appreciated, thanks |
|
|||
|
I don't understand exactly what the problem you're having is, but if I understand correctly, then you can just assign the value to a view variable:
Code:
$this->view->year = Zend_Date(); Code:
echo $this->view->year; Code:
echo $this->year; |
|
|||
|
I have that bit I want to pass my date result to the footer.phtml that will appear with the front end layout (i.e. every page no matter the controller). I know how to write it into the pages for a specific controller just the global layout.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|