Result template logic