This changes the existing context_header code copied from the outputrenderers file and makes it use templates.