View Single Post
  #1 (permalink)  
Old 04-03-2008, 09:13 PM
sukumar sukumar is offline
Junior Member
 
Join Date: Feb 2008
Posts: 4
Default How to call one controller from another controller

For example, my directory structure is some thing like this:

application/
controllers/
teachingphilosophycontroller
patents
views/
scripts/
patents/
hitaps.html
robotics.phtml
teachingphilosophy/
index.phtml

In the patents controller I have two actions named hitaps and robotics. I am using href links for the links on the webpage. I put the href value has teachinghilosophy for the teachingphilosophy link and patents/hitaps, patents/robotics for the hitaps and robotics link for the home page. Like wise I put the links in teachingphilosohy page for the patents such as patents/hitaps and patents/robotics. While in the patents page, when I am putting the href link as teachingphilosophy, its not working.

For suppose, I accesses the patents view files from the home directory, then the url becomes www.example.com/patents/hitaps. If I click on teachingphilosophy link from this page, it is taking the url as www.example.com/patents/teachingphilosophy and giving error that there is no action name in that controller. But there I need to go to www.example.com/teachingphilosophy. I hope some one can help me. Thanks.

Note: the directory structure given above is not spaced properly. I hope anyone can understands it. Its just the normal layout as in zend documentation.

Last edited by sukumar : 04-03-2008 at 09:16 PM.
Reply With Quote