24 Jan
2007
24 Jan
'07
3:05 a.m.
Larry Garfield wrote:
I don't think themes themselves need to register what they override. That could be scanned and cached, too, on the theme admin page. A theme() call then just becomes a lookup to see which of the three locations, in order, a theme file exists. Just borrow some of chx's menu magic SQL to find the "right" template.
I'm not completely sure that scanning would be adequate here; but I'm also not sure it wouldn't be. This will need to be analyzed, I think. For example, code that changes templates on some condition needs to be retained, and scanning might break this. I'm not sure, scanning might be able to take it into account in some fashion.