tags:

views:

20

answers:

1

I am making a simple component that responds with an XML message.

What I have now is:

controller.php
               models/
                     register.php
                     login.php
                     download.php
               views/
                     users/
                           view.xml.php
                     login/
                           view.xml.php
                     download/
                              view.xml.php

What I want is:

controller.php
               models/
                     users.php

               views/
                     users/
                           view.xml.php

The component will perform three operations, login, register and download.

How should I set this up?

ie. controller will have three tasks (login, register and download) How will I get the data to the View? Do I need three models? Should I just output the xml from the controller?

A: 

Why not keep your models as those 3 and have a single view? You can call multiple models in a single view. Check this post out.

Martin