Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Template not used on mobile device
Avatar
suisse #1
Member for 2 weeks · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Template not used on mobile device
Hello

I have set up Dokuwiki with Bootstrap3 template. It all works fine on the computer. However, when accessing the wiki from my mobile device (Android), the Dokuwiki template is used instead. The same happens when testing it on the computer using the Developer Tools in Chrome.

I then installend the Loadskin extension. Now, when opening the page on my smartphone, I have a dropdown menu to choose a template. It defaults to Dokuwiki. When tapping on Bootstrap3, the page is automatically reloaded, but my choice is overridden and the page is shown in Dokuwiki style again.

Any help is greatly appreciated.
Avatar
suisse #2
Member for 2 weeks · 2 posts
Group memberships: Members
Show profile · Link to this post
Solved

I use the sectiontoggle plugin and the option `mobile_alt` was set to `dokuwiki`
Avatar
ach (Administrator) #3
Member since May 2006 · 1921 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
Quote by suisse:
I use the sectiontoggle plugin and the option `mobile_alt` was set to `dokuwiki`

That is so weird. In my opinion, the sectiontoggle plugin has no business having such an option as choosing a different template for mobile has nothing to do with toggling sections. :huh:
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Dokuwiki is the fallback for templates that do not support mobile. Read the documentation. Obviously the OP did not.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
This post was edited on 2019-07-10, 03:11 by turnermm.
Avatar
aubreyb #5
Member since Feb 2017 · 17 posts
Group memberships: Members
Show profile · Link to this post
Not following that - surely the Bootstrap3 template "supports mobile" - that is the very point of (or at least a main point of) Bootsrap....
Avatar
turnermm (Moderator) #6
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Quote by aubreyb:
Not following that - surely the Bootstrap3 template "supports mobile" - that is the very point of (or at least a main point of) Bootsrap....

The user has to indicate that in the Configuration Manager.  The plugin does not auto-detect whether a template supports mobile.  It's simply a matter of reading the documentation on the plugin page.  Which you should do for any plugin you use.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
This post was edited on 2019-07-17, 14:59 by turnermm.
Avatar
andi (Administrator) #7
User title: splitbrain
Member since May 2006 · 3450 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #3
Quote by ach on 2019-07-10, 01:07:
Quote by suisse:
I use the sectiontoggle plugin and the option `mobile_alt` was set to `dokuwiki`

That is so weird. In my opinion, the sectiontoggle plugin has no business having such an option as choosing a different template for mobile has nothing to do with toggling sections. :huh:

From what I understand from the plugin's page (without ever having tried it) I assume that the idea is to use the section toggles on mobile only. To decide if the user is using a mobile phone, the plugin sniffs the user agent header. It could stop there  but the plugin also tries to be clever and decides that it should not only make the sections togglable but also ensure a good overall mobile experience by switching the template to the default one (assuming that other templates provide a worse mobile experience). turnermm points out that this behaviour can be disabled.

Personally, I see two problems with this

  • as ach points out, switching the template seems to be out of scope for this plugin (and unexpected by users)
  • detecting mobile use via mobile browser is a bit archaic and may actually disagree with what the rest of the template does for mobile detection

Modern mobile detection does not care for the actual device at all, but uses media queries to determine the screen size/resolution. Ideally this plugin and the template should use exactly the same break points to provide a streamlined user experience. I haven't looked at the code - this might actually be very hard to implement. But I thought to add my two cents.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
turnermm (Moderator) #8
Member since Oct 2009 · 4675 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Modern mobile detection does not care for the actual device at all, but uses media queries to determine the screen size/resolution. Ideally this plugin and the template should use exactly the same break points to provide a streamlined user experience. I haven't looked at the code - this might actually be very hard to implement. But I thought to add my two cents.

The plugin does in fact sniff out whether a mobile or tablet device is  being  used.  But when the plugin was written 6 years ago, there wasn't always a guarantee that every template supported the smaller sizes.  So the dokuwiki template was set as a default back-up in case the template did not support the smaller sizes but only if the user allowed it to be used.  Now maybe that was a mistake.  But I don't really see what the issue is about users reading the documentation where they would learn about this.  You can be sure that if I hadn't set a default, and the template didn't support mobile, I would have gotten the opposite complaint, and this was the first time in six years that this issue arose.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-07-23, 00:56:52 (UTC +02:00)