Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
Is it possible to switch template when we are on mobile version ?
That is we have a different template for mobiles.
Thanks for helping.
kusum
Hi Kusum
Yes, it's possible, you have to use RenderMvcController for defining what view to use for the current request, the code will look like that:
public class HomeController : Umbraco.Web.Mvc.RenderMvcController { public ActionResult Index(RenderModel model) { if (Request.Browser.IsMobileDevice) { return View("mobileDeviceTemplateAlias", model); } return CurrentTemplate(model); } }
Hope it will help you.
Thanks,
Alex
Thanks alex for your quick reponse. I will try it :).
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Is it possible to change template for mobile version in umbraco 7
Hello,
Is it possible to switch template when we are on mobile version ?
That is we have a different template for mobiles.
Thanks for helping.
kusum
Hi Kusum
Yes, it's possible, you have to use RenderMvcController for defining what view to use for the current request, the code will look like that:
Hope it will help you.
Thanks,
Alex
Thanks alex for your quick reponse. I will try it :).
is working on a reply...