For one thing str_replace()
returns the replaced string, it doesn't modify the original string, so as written the new replaced value is created and then just thrown away because you haven't assigned the return value to anything. You need to set the template value to the replaced value:
$this->template = str_replace('{{page.content}}', $replace, $this->template);