View Single Post
  #2 (permalink)  
Old 05-19-2008, 06:24 PM
kuba kuba is offline
Junior Member
 
Join Date: Mar 2008
Posts: 26
Default

omg Aurheim please read anything about Zend Framewrok on maunual or any other tuturial. You are asking about such trivial question that it drives me crazy.

My propostition is very simple - read something about client side of application (html, javascript), basics of php and design patters (including MVC), mod_rewrite, and only then ZF. You are definetely trying to do things that are too hard for you.

However, I am helpful person so I'l try to answer your questions.

1. First of all, looking at the links you're accessing - configure your web server root to html directory, or make the structure as follows (it is not required but maybe it will help you):

Code:
+application
   bootstrap.php
   +modules
      +default
         +controllers
            IndexController.php
            TransfereController.php
            ...
         +models
         +views
            +index // IndexController
               index.phtml // IndexController:indexAction()
               test.phtml // IndexController:testAction()
            +transfere
               index.phtml // TransfereController:indexAction()
               other.phtml // TransfereController:otherAction()
      +someothermodule
   +configs
   ...
+library
   +Zend
   ...
+public
   +css
   +js
   +images

index.php // require_once '../application/bootstrap.php';
.htaccess // RewriteEngine On
                 !\.(js|ico|gif|jpg|png|css)$ index.php
As you can see the main difference is that index.php is no longer in html folder.

now if you go to http://localhost/app/, IndexController and indexAction() from default module is accessed. application/modules/default/index/index.phtml

Code:
http://localhost/app/index => IndexController:indexAction() application/modules/default/index/index.phtml

http://localhost/app/index/index => IndexController:indexAction() application/modules/default/index/index.phtml

http://localhost/app/index/test => IndexController:testAction() application/modules/default/index/test.phtml

http://localhost/app/transfere => TransfereController:indexAction() application/modules/default/transfere/index.phtml

http://localhost/app/transfere/other => TransfereController:otherAction() application/modules/default/transfere/other.phtml

http://localhost/app/someothermodule/index/index => Someothermodule_IndexController:indexAction() application/modules/someothermodule/index/index.phtml
2. I really can't see where does the problem with rendering comes from. I can only think of this situation:

In controller you propably write:
PHP Code:
echo $form1;
echo 
$form2;
echo 
$form3
Am I right?
However, You should type in
PHP Code:
$this->view->form1 $form1;
$this->view->form2 $form2;
$this->view->form3 $form3
In conclusion, this may help you. However, you are "obliged" to get some further information on topics I listed in the beginning. I strongly encourage you to do some easier things (do you really need the functionality ZF provides ??)

Last edited by kuba : 05-19-2008 at 07:05 PM.
Reply With Quote