pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
Res facta quae tamen fingi potuit ([personal profile] pauamma) wrote in [site community profile] dw_dev2014-09-27 05:18 pm
Entry tags:

Converting BML to TT and routing in the presence of a widget

The workflow given in http://wiki.dreamwidth.net/wiki/index.php/Routing_and_Template_Cookbook:_BML_Conversion_Workflow doesn't indicate what to do when you find yourself in the presence of a widget, like for htdocs/support/submit.bml. Some questions an addition could cover:
- Can/Should I use the widget itself directly in a controller?
- Which parts of the widget need to go where?
- When is it safe to get rid of the widget itself? (eg, how do I know it's not used anywhere else)

I probably forgot some questions/issues. Discuss here and I'll try to summarize to the wiki?
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2014-09-29 05:16 am (UTC)(link)
I think it makes more sense to convert into controller/template. However that's a lot of extra work... and until that's done maybe we can call LJ::Widget->render directly?

(I think that because the widget does both controller and view functionality, though, that there's going to be a lot of redundancy if you just use it as-is)

A search for LJ::Widget::WidgetName should be sufficient -- most (all?) widgets are only used on one page so I wouldn't worry about it too much.