When I deprecated the directoryTemplate feature, I broke Prefs, Domains, the login screen. Basically anything that didn't display a directory was fucked.
Now it's time to make them work again.
How you tell us where the directory-rendering HTML is: wrap it in a <%block:directory%> macro.
Before we process your directory page, we'll find it and remove the <%block:directory%> and </%block:directory%>.
If we're processing a page that doesn't have a directory on it, for example a Prefs page, we'll not only remove the <%block:directory%> macro text but we'll remove everything in-between them.