How to apply the layouts/_default/baseof.html to ExecuteAsTemplate?

A post was split to a new topic: Can I pass function to partial?