[Midas] controller to view

Michael Grauer michael.grauer at kitware.com
Thu Jul 5 15:23:22 EDT 2012


This is the standard way of doing it, setting $this->view->mvariable .  I
guess that could be a problem of overwriting, but we have not run into
trouble with that.  For the most part, you set the values in your single
controller action, and then use the values in your single view page, so you
can see what variables are being set and used at a glance (somewhat anyway,
the layout.pthml also gets called, etc, but uses only a few variables that
you are unlikely to overwrite).

On Thu, Jul 5, 2012 at 2:17 PM, Mona Wong <mona at sdsc.edu> wrote:

>
> > If you want a more human readable error view, just pass some sort of
> variable down to your view that causes the view to display the error
> condition.
>
>         What's the proper way to pass a variable from controller to view?
>  Is it simply setting $this->view->myvariable = "my value" in the
> controller?  That seems to run into the danger of overwriting some other
> variables in view used by other functions?
>
> Mona
>
> *********************************************
>     Mona Wong
>     Web & iPad Application Developer
>     San Diego Supercomputer Center
>
>     "Forgive everyone everything."
>                                 -- Regina Brett
> *********************************************
>
>
>
>
> _______________________________________________
> Midas mailing list
> Midas at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>



-- 
Thanks,
Michael Grauer
R & D Engineer
Kitware, Inc.
919 969 6990 x322
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120705/60e7dc01/attachment.html>


More information about the Midas mailing list