codeviewer - template functionality