I'm pretty new to php and Zend in general, so I'll try to be as clear as I can. I have taken over a complete web project written in PHP.
In the main layout is script partials/menu.phtml
, where is a list of few pages. And I wanted to add another one (called pricelist). I created a new pricelist.phtml
file in directory info/
with other pages leading from this menu (in view).
Then in InfoController
I created new public function pricelistAction()
which includes
$this->view->headTitle()->append('Info');
$this->view->headTitle()->append('Pricelist');
Nothing is written in model. When I run localhost and click Info - Pricelist, the page is not found. I have no clue what I might have forgotten or what is wrong. I'm stuck on this for several days and starting to be desperate. I really appreciate any help. Thank you very much!
Two things:
Make sure there is a proper route in your module.config file that causes this action to be triggered. /baseroute/:action
or /baseroute/pricelist
...something like that
There are several ways of loading views/templates
: Some developers require you to set new view files up explicitly in the view_manage=>template_map
section of your module.config
file, rather than let zend handle it automatically.
It's hard to guess without seeing your code/directory structure but this is where I would start.