edit template for directive