dean
2003-12-15, 23:03
On Dec 15, 2003, at 9:54 PM, Robert Moser II wrote:
> > On Dec 14, 2003, at 10:00 PM, Dan Sully wrote:
> >> Template Toolkit - http://www.template-toolkit.org/ is my prefered
> >> solution, and already has a syntax very like what the SlimServer
> >> already has. I'm not wanting to get into template system wars here.
>
> to which dean blackketter blurted out:
>
>> I have no problem with this at all. We'll need to move over all the
>> existing skins...
>> Volunteers?
>
> I've been looking at it, and it seems very powerful.
> For minimal disturbance we should probably try to bend it into
> a drop-in replacement for our home-brew template system.
Agreed. The best thing would be to have a tool that we could run over
the skins to upgrade them to the new syntax.
> Once we've had more of a chance to explore the possibilities, we could
> rework the whole HTTP interface to fully leverage this tool. Off hand,
> I'm thinking of making some custom Slim specific Template::Plugins
> which would expose all the information to the templates.
>
> Something like:
> [% USE Library %]
> <table>
> [% FOREACH genre = Library.genres %]
> <tr><td><a href="browseid3.html?song=&artist=&album=&genre=
> [% genre.name %]&player=[% player.id %]">[% genre.name %]</a><td>
> <td><a href="status.html?p0=playlist&p1=addalbum&p2=
> [% genre.name %]&p3=&p4=&player=[% player.id %]" target="status">
> </td></tr>
> [% END %]
> </table>
>
> naturally an actual template would be much more involved.
Neat. Robert or Dan: Any idea what the performance impact would be
in moving to this system?
-dean
> > On Dec 14, 2003, at 10:00 PM, Dan Sully wrote:
> >> Template Toolkit - http://www.template-toolkit.org/ is my prefered
> >> solution, and already has a syntax very like what the SlimServer
> >> already has. I'm not wanting to get into template system wars here.
>
> to which dean blackketter blurted out:
>
>> I have no problem with this at all. We'll need to move over all the
>> existing skins...
>> Volunteers?
>
> I've been looking at it, and it seems very powerful.
> For minimal disturbance we should probably try to bend it into
> a drop-in replacement for our home-brew template system.
Agreed. The best thing would be to have a tool that we could run over
the skins to upgrade them to the new syntax.
> Once we've had more of a chance to explore the possibilities, we could
> rework the whole HTTP interface to fully leverage this tool. Off hand,
> I'm thinking of making some custom Slim specific Template::Plugins
> which would expose all the information to the templates.
>
> Something like:
> [% USE Library %]
> <table>
> [% FOREACH genre = Library.genres %]
> <tr><td><a href="browseid3.html?song=&artist=&album=&genre=
> [% genre.name %]&player=[% player.id %]">[% genre.name %]</a><td>
> <td><a href="status.html?p0=playlist&p1=addalbum&p2=
> [% genre.name %]&p3=&p4=&player=[% player.id %]" target="status">
> </td></tr>
> [% END %]
> </table>
>
> naturally an actual template would be much more involved.
Neat. Robert or Dan: Any idea what the performance impact would be
in moving to this system?
-dean