Template:Shared utility functions