Earlier quoted context omitted.
Forward (a new e-commerce platform) uses a template engine and routing layer that might be something like what you describe. It works with MongoDB, has a REST-like model system, plugin system similar to WordPress, and you can do stuff like this in a template: {get $blogs from "/channels/blogs/entries"} ... Alpha version was released just yesterday, you can sign up and download it at http://getfwd.com /shameless plug
You're querying from templates? Isn't that considered bad practise? Isn't there a potential problem with template designers querying for loads of data and issuing a slow query?
I doubt Wordpress would be used for anything other than simple blogs if it weren't for querying from templates.
Obviously there is the risk of theme developers loading tons of queries from a template but I think trying to prevent that would be premature optimization. The benefit of greater customizability outweighs the potential performance hit IMO.