photo

Robert Rude

shared this problem
6 years ago

Employees Involved

photo

Ryan Bonham

Admin

photo

PIV Support

Admin

Statistics

11
Comments
1743
Views

Relates to

Share

3
votes

2012 and still no docs about mobile detection or templates!

Why is there no documentation whatsoever about mobile detection or mobile templates? We are using or 3.1.3 and have a "mobile" template set. Our site config has "mobile" specified in the templates for mobile users, but it does not get used when I go to the site with a mobile device.

The documentation never mentions the word "mobile" and there is little mention of it in any forums. Considering the importance and wildfire growth of mobile visitors over the past 2 years, i would think it would warrant some thoughtful mention in the docs.

Add Comment

Comments (11)

photo Employee
0

What mobile device are you using? And what browser?

Your mobile device's browser is likely not identifying itself as such, due to a setting in the browser that you should be able to change. There is nothing any programmer can do if the browser identifies itself as a regular browser, and not a mobile browser thus there is no "setting" in OR that you are missing or that is undocumented. I use a 10" tablet and *intentionally* have its browser set so I see regular versions of pages, and not the mobile ones.

Not sure otherwise what should be in the docs that is not already covered by the template documentation.

photo
0

I've designed a mobile template for my wife's website and have tested the mobile site and detection in OR pretty thoroughly with numerous devices. The ONLY issue I have is with my 10" tablet where the manufacturer has included a WAP profile link in the kernel so regardless of which user agent string I specify in the browser, OR will detect it as a mobile browser.

This isn't the fault of OR as it is properly using the mobile template when a WAP profile exists. Just my tablet does not have the ability to disable this.

I can tell you the mobile detection works properly on a blackberry, several android phones and tablets, a windows mobile phone, webos, iphone, ipod touch, and ipad.

photo Employee
0

>>The ONLY issue I have is with my 10" tablet where the manufacturer has included a WAP profile link in the kernel so regardless of which user agent string I specify in the browser, OR will detect it as a mobile browser.

That's just cruel.

photo
0

Yes it was, although, at first I was blaming OR. Actually I guess it's an entry in the build.prop. Regardless, I'm now rooted with a custom rom and happily viewing desktop sites like I want on my tablet.

photo
0

I was eventually able to get the mobile detection to work and display the mobile templates. But I still have questions about how the mobile detection works and how I can control the user experience.

For example, there is a tag in the mobile main.html template called mobile_full_template_link which should send the user to the non mobile version of the site, but it does not. The tag creates a link, but the link is just a "#" and so it does nothing.

Where are the mobile detection scripts and how are they utilized? How can we override this control and give the user the option of using the full site from a mobile device, or vice versa? Is there an url parameter we can use to force a mobile or non-mobile experience?

There is no mention of mobile templates or mobile detection in the docs. It's hard to control the user experience without knowing where or how OR is delivering it.

photo Employee
0

>For example, there is a tag in the mobile main.html template called mobile_full_template_link which should send the user to the non mobile version of the site, but it does not. The tag creates a link, but the link is just a "#" and so it does nothing.

The tag mobile_full_template_link uses Javascript, so the link in the tag is just "#". You need to turn on the "Allow template switching" setting in your Site Config, for this feature to work. It is on the General Tab, under the Security Settings.

>Where are the mobile detection scripts and how are they utilized? How can we override this control and give the user the option of using the full site from a mobile device, or vice versa?

The mobile detection scripts are an internal part of Open-Realty and you can not modify them. The tag mobile_full_template_link is how you allow users to control which version of the site they see.

> Is there an url parameter we can use to force a mobile or non-mobile experience?

You can use the select_users_template GET Variable, after you have enabled template switch in your site config..

eg. http://demo.open-realty.org/?select_u...

photo
0

Thanks for the additional info. I have the allow template switching on my my site config and I am able to change templates with the additional url parameter. However, the mobile_full_template_link still doesn't do anything. I've tested on 3 mobile devices, but the link does nothing. I have java loading in the main.html template. Any ideas why the link does not work?

photo
0

Do you have the javascript loading in the mobile template's main.html and/or page1_main.html files?

Do your mobile devices support javascript?

photo
0

Yes. Both the load_js and load_js_last tags are in the proper place in the main.html template. I'm testing with 3 devices which have javascript enabled and working. When I click the link for the full site it just appends the # to the url and refreshes the page, but nothing changes. It doesn't go to the full version of the site.

photo
0

I can see that the javascript is being written in the page by viewing the source in the browser. For whatever reason though, clicking it doesn't do anything.

photo Employee
0

Can you please post a link to your site, so we can test this.

Leave Comment

photo

Attach files...

The file must be a jpg, gif, png, bmp, ico, pdf, doc, rtf, txt, zip or rar no more than 20M