Back to the Soma's template approach: I just realized that we would not need to use dirty hacks to force PW to render alternate template file, if PW would allow us to set template files for both layout and particular view.
Example:
We have a post template.
In post template we set
main.php for layout (default setting for the whole site) - renders the whole HTML page
post.php for view (default setting for this particular template - derived from the template name) - renders the content specific to the post template, nested inside the main.php layout
This approach is common in many web application frameworks.