pass uid to the template

uid is required for the template for correct rendering otherwise it will throw an exception.