Zend Framework 1.12.3, part 4 – more actions for controller
Today I decide to add several actions to my animals controller. I have describe action, so I add else two: sepia and whiteblack.
Lets begin.
First You create sepia action for animals controller. Right click project name and choose Zend->Run command. In window write in Filter field:create action
and in Parameters field:sepia animals
and click Run button.
In the same way You do with another action: whiteblack.
In projects tree You see in view/scripts/animals two added files: sepia.phtml and whiteblack.phtml.
If You expand images node, You see only dog.jpg picture.
Drag and drop into this node another pictures: dog_sepia.jpg and dog_wb.jpg.
In AnimalsController.php You see method for another two actions.
Open describe.phtml file in scripts/animals and copy its content.
And paste into sepia.phtml and whiteblack.phtml.
In sepia.phtml change content for it: