This seems too broad to me. What about the case when we render a template? btw, the magic ``docName`` seems a bit inflexible to me. I'd rather see templates render templates directly.