allow setting code/type via template tag too