Add template piping function. Refs #25