foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)
foxfirefey ([personal profile] foxfirefey) wrote in [site community profile] dw_dev_training2010-01-26 01:42 pm

The first step on the road to killing BML

I've recently written a guide on Routing and Template Toolkit, which is the system that's going to be replacing BML. As is, the guide is probably only suitable for people who already know their way around the code fairly well, but it's a start to understanding the system if that's what you're interested in.

If you have questions, ask them here, so we can determine if they have answers that should be added to the guide or need solutions developed.

Learning this is especially relevant if you're doing anything that involves significantly revamping a given page, or creating a new page! It'd be better if it could be translated to this system instead of being done in BML.
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)

[personal profile] pauamma 2010-01-30 06:04 pm (UTC)(link)
Hmm, yes, definitely not "instead". But now I'm thinking of the reverse case, several templates sharing a controller. (Possible use case: several posting template pages sharing the same backend, as suggested in http://dw-suggestions.dreamwidth.org/105294.htm.) I'm thinking that for those, it might be easier having the template register the controller. (Or it might not - I'm thinking aloud.)

Additionally, there's the reverse of what foxfirefey mentioned: is it possible for pages to be so simple that they need a template but no controller? (I'm thinking static or mostly-static pages.)
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2010-01-30 11:30 pm (UTC)(link)
That's what the register_static ( currently broken, but will be fixed -- probably will tack it on to bug2282 ) is for.

register_static( '/path', 'some.tt', app => 1 );

And then just a single DW::Controller:<whatever> file for "static templates" (or throw it in ::Misc)