Add site/file attribute.
Move template variables to the database sub-resource.