[Solar-talk] Partials/Tiles/Elements/Components/Something

Matt M. goodieboy at gmail.com
Sat Nov 4 15:01:05 PST 2006


My thinking has been this... however radical... just a thought... :)

Change the currently named "View" directory to "templates". Put two sub-dirs
in each. One called 'pages' and one called 'layouts'. One thing that hasn't
completely settled with me is naming directories singular, and upper case
when there are no objects in it. I see upper case singular directories as
namespace directories. Anyway...

Now, the "View" directory would be for classes. The page controller could do
a check to see if a View exists in the _getView() method. If one exists,
it'll be used instead of the Solar_View class. In the View directory, you
could have a dub dir called "Page" and one called "Layout". Then, you'd be
able to add logic independent of controllers.

Matt

On 11/4/06, Andreas Ravnestad <andreas.ravnestad at gmail.com> wrote:
>
> Hi and re - second time I'm subscribing now, hopefully with the right
> email addy this time.
>
> I've started using Solar as the base for porting some legacy
> applications to MVC, and so far it works just great. Everything is sane :)
>
> However, I've run into a (for me) very common problem - I want to render
> partial content within a page layout, completely decoupled from whatever
> controller is being executed. However, I want more than just rendering
> some random template - I also want some logic to go with it. In Ruby on
> Rails, it's called Partials. In CakePHP, it's called Elements. In
> Struts, it's a taglib known as Tiles. I hope this is enough for you to
> identify exactly what I want here :) Currently I am using helpers for
> this, but I'm not too comfy with that.
>
> Some examples of concrete use cases:
> * A dynamic menu inside a page layout
> * Comments directly attached to an article
> * Photo streams and such (think flickr)
>
> And the list goes on.
>
> Is this possible in Solar? Where can I find more info to start using it?
> If not, I would like to help adding this kind of functionality asap :)
>
> -Andreas
> _______________________________________________
> solar-talk mailing list
> solar-talk at lists.solarphp.com
> http://mail.killersoft.com/mailman/listinfo/solar-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.killersoft.com/pipermail/solar-talk/attachments/20061104/0ddf18c8/attachment.htm 


More information about the solar-talk mailing list