Themes

 
 
Gareth J Barnard
Mobile / Tablet only theme setting.
Group DevelopersGroup Particularly helpful Moodlers

Hi,

Is there a way of specifying in a Moodle 2 theme's config.php etc. that it can only be used in the mobile / tablet theme selector?  This is because it is useful elsewhere to use the function 'get_device_type()' in 'moodlelib.php' to make alterations specific to a mobile theme and if the device is not mobile / tablet but a mobile / tablet theme is being used, then this might cause issues that are not immediately apparent to the user.

I know with the MyMobile theme there is the option of 'switch to standard theme' but this should still be ok.

But perhaps instead of using 'get_device_type()' or what I'm asking above, could there be an function in $THEME that states 'is_mobile_theme()' instead of having to rely on the device type or theme name?

Thanks,

Gareth

 
Average of ratings: -
It's only an avatar...
Re: Mobile / Tablet only theme setting.
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

I don't think there is Gareth, so the best thing is to create a request to suggest this in Moodle Tracker as an Administration improvement.  Rajesh is currently working on some changes to how the Theme Selector works, so this may be a good time before 2.5 is released.

I had suggested MyMobile should be listed as the Mobile theme by default in the selector same too for Standard Old for Legacy.

If there was a setting in a theme's config.php, then it may make sense to have some setting within the theme to make it such, as some normal themes work OK in Tablets and Mobiles (iPad/iPhone).

Mary

 
Average of ratings:Useful (1)
Gareth J Barnard
Re: Mobile / Tablet only theme setting.
Group DevelopersGroup Particularly helpful Moodlers

Thanks Mary, I've raised MDL-38068 and added you as a watcher.

Cheers,

Gareth

 
Average of ratings: -
It's only an avatar...
Re: Mobile / Tablet only theme setting.
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

Thanks Gareth,

Let's hope it get's somewhere! smile

Cheers

Mary

 
Average of ratings: -