Thread
:
Adding a constructor to the controller
View Single Post
#
2
(
permalink
)
04-27-2008, 06:58 PM
Piro
Junior Member
Join Date: Apr 2008
Location: Holland
Posts: 8
In ZF you can use the init() function in your controller. For example:
PHP Code:
public function
init
()
{
$this
->
_helper
->
layout
->
setLayout
(
'shop'
);
}
This will let the complete controller use the 'shop.phtml' layout file instead of 'layout.phtml'
Piro
View Public Profile
Send a private message to Piro
Find all posts by Piro