Hi, Is there a way to display View Mobile Version on the desktop. I found code below, but maybe I do not fully understand what is happening. J.
[ChildActionOnly] public ActionResult ChangeDeviceBlock() { if (!_mobileDeviceHelper.MobileDevicesSupported()) //mobile devices support is disabled return Content("");
if (!_mobileDeviceHelper.IsMobileDevice(_httpContext)) //request is made by a desktop computer return Content("");
Maybe I was not clear enough. Since I do not purchase a license of 51degrees , tables are not detected and thus iPad is presented the mobile version instead of the tablet/ regular site. This might happen for more tables I assume. So is it possible to show on a desktop version that there is a mobile site as well? Like 'Visit mobile site' if the desktop version is shown? I have the feeling the code is there, but for some reason no label is present to render 'visit mobile site'. Where to add this label? I can add it to language, but where to put the translation code?
Maybe I was not clear enough. Since I do not purchase a license of 51degrees , tables are not detected and thus iPad is presented the mobile version instead of the tablet/ regular site. This might happen for more tables I assume. So is it possible to show on a desktop version that there is a mobile site as well? Like 'Visit mobile site' if the desktop version is shown? I have the feeling the code is there, but for some reason no label is present to render 'visit mobile site'. Where to add this label? I can add it to language, but where to put the translation code?
J.
Yeah, those 'tweeners are a pain. I think mobile is not what you are looking for... more like responsive design, which might adapt to screen size, orientation, etc, etc. The latest 3.30 discussion thread discusses this to some detail.
In any event, you could sort of hack together a solution by putting a link 'Show Other Theme', which merely forces a different theme, but... I'm not sure if that would work that way I'm thinking it should.