[Solar-talk] yui-ext set view path
Rodrigo Moraes
rodrigo.moraes at gmail.com
Thu Nov 2 03:34:41 PST 2006
A side note on the view/layout approach: I prefer to store most
templates in the view directory. This is less confusing and makes
sense because I think that everything except the page structure should
be manipulated as a view.
This subject confused me a lot when I started with Solar. I don't
think it is useful to have _auth.php in the layout dir, because you
can only include it directly in a layout, not in a view (I mean,
without changing the view paths).
Many times I need an authentication form in a view, and so I need to
change the path to reuse that template. At least for me, this leads to
all kinds of confusion. So I prefer to only store page structure stuff
- page head and body tags, and perhaps a rough page skeleton - in the
layout dir, and include the /View dir to the layout path by overriding
_setViewLayout().
Changing the layout path is needed to use dynamic layouts. You have a
dynamic page skeleton in the layout template which includes views, but
views can't be included directly in layouts without overriding
_setViewLayout() - so we do it.
I hope this clarifies things a bit.
rodrigo
More information about the solar-talk
mailing list