de3
de3

Reputation: 2000

Change default views zend framework behaviour

I just found out that my actions can use the same view just, just changing some parameters.

So, as /controller/ loads 'path/to/scripts/controller/index.phtml', I want controller/action1 to load also 'path/to/scripts/controller/index.phtml' instead of loading 'path/to/scripts/controller/action1.phtml', as it does by default. Which is the cleanest way to do this?

Upvotes: 3

Views: 659

Answers (1)

Aurelio De Rosa
Aurelio De Rosa

Reputation: 22162

You can do this in your action1 of the same controller:

$this->_helper->viewRenderer('index');

Upvotes: 3

Related Questions