Set template mobile on middleware