[Solar-talk] Partials/Tiles/Elements/Components/Something
Travis Swicegood
development at domain51.com
Sun Nov 5 06:50:00 PST 2006
Andreas Ravnestad wrote:
>
>
> On 11/5/06, *Travis Swicegood* <development at domain51.com
> <mailto:development at domain51.com>> wrote:
>
> Look through some of the existing app's templates for calls to
> $this->_partial() - I think that does exactly what you want.
>
>
> That looks great, and in many cases it is exactly what I want :)
> However, I also want some more logic to go with it. I browsed the RoR
> documentation today and found [1] which is exactly what I want. Is
> this doable in Solar?
>
> [1] http://wiki.rubyonrails.com/rails/pages/UnderstandingComponents
Ahh - I see what you're wanting now. That is not directly available in
the view, however you could achieve the same result doing:
$front = Solar::factory('Solar_Front_Controller');
$component = $front->display('/controller/action');
I would recommend handling these in the controller - see
Solar_Controller_Page::_preRender() for a place you could assign the
results of that in to the view.
-T
More information about the solar-talk
mailing list