Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Bug reports and fixes
.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
How to enable mobile version in new Elxis 5.0
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to enable mobile version in new Elxis 5.0 (Read 4081 times)
armpouniotis
Sr. Member
Posts: 377
How to enable mobile version in new Elxis 5.0
«
on:
September 30, 2019, 19:36:21 »
Hi there !
I am trying to enable mobile version on elxis 5.0
I can't see any option inside settings.
There isn't any module about it as well ! (as far as I remember there used to be in previous versions...)
Any ideas how to enable it ?
Thank you in advance
Christos
«
Last Edit: September 30, 2019, 21:42:40 by armpouniotis
»
Logged
Christos Armpouniotis
webgift
Elxis Team
Hero Member
Posts: 4193
Re: How to enable mobile version in new Elxis 5.0
«
Reply #1 on:
October 01, 2019, 09:06:34 »
Hello @armpouniotis!
This option deprecated in Elxis 5. Most of the templates are responsive to
portable devices so there is no the need to create a version for mobile that
it will be different than the responsive approach of your elxis website.
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
armpouniotis
Sr. Member
Posts: 377
Re: How to enable mobile version in new Elxis 5.0
«
Reply #2 on:
October 01, 2019, 13:18:46 »
you are wrong ! (sorry to say that...)
in previous elxis versions 4.x, I used to modify these files: mobile.php etc located in"templates > system, in order to adjust my template in mobile version, something which is very useful !
Since I can't do this anymore, my template doesn't look the way my clients want !
If i copy / paste the files from previous elxis version (4.x), to new version (5.0), will they work ?
Thank you in advance
Christos
Logged
Christos Armpouniotis
webgift
Elxis Team
Hero Member
Posts: 4193
Re: How to enable mobile version in new Elxis 5.0
«
Reply #3 on:
October 01, 2019, 14:21:17 »
You can simply diplay: none the HTML elements in deskop and make them visible in
portable devices by making display: block;
It's been a long time ago since i see mobile version for a website.
«
Last Edit: October 01, 2019, 14:22:53 by webgift
»
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
armpouniotis
Sr. Member
Posts: 377
Re: How to enable mobile version in new Elxis 5.0
«
Reply #4 on:
October 01, 2019, 14:45:29 »
ok I will give it a try...
Christos
Logged
Christos Armpouniotis
datahell
Elxis Team
Hero Member
Posts: 10356
Re: How to enable mobile version in new Elxis 5.0
«
Reply #5 on:
October 01, 2019, 18:54:29 »
Mobile version is deprecated as of Elxis 5.0 and the old "
ELXIS_MOBILE
" constant is always
0
. However if you want to have a mobile (tablet, web tv, or other) specific version of your template you can easily do it.
Inside your template's index.php file write:
$is_mobile = $elxis->obj('browser')->isMobile();
Then you can include different template's files based on the mobile status (with different layout, modules positions, etc) :
if ($is_mobile) {
include(ELXIS_PATH.'/templates/mytemplate/mobileversion.php');
} else {
include(ELXIS_PATH.'/templates/mytemplate/pcversion.php');
}
The recommended option
The recommended option is to use responsive templates.
Elxis also provides you out-of-the-box CSS classes to easily display different content based on the device status without changing the html.
These css classes are the following:
elx5_mobhide
Hide on mobile devices (480px or less)
elx5_lmobhide
Hide on mobile devices with large screen (650px or less)
elx5_tabhide
Hide on tablet devices (767px or less)
elx5_smallscreenhide
Hide on small size screens (980px or less)
elx5_midscreenhide
Hide on medium size screens (1240px or less)
elx5_lmobshow
Show on mobile devices with large screen (650px or less)
Sample usage:
<div class="myclass elx5_lmobhide">Hello PCs!</div>
<div class="myclass elx5_lmobshow">Hello Mobiles!</div>
«
Last Edit: October 01, 2019, 19:08:15 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
armpouniotis
Sr. Member
Posts: 377
Re: How to enable mobile version in new Elxis 5.0
«
Reply #6 on:
October 01, 2019, 21:52:38 »
ok ! This is very useful information !
In that case, Elxis gives me more options on making templates....
I will do some more research on that and I will let you know !
Christos
Logged
Christos Armpouniotis
webgift
Elxis Team
Hero Member
Posts: 4193
Re: How to enable mobile version in new Elxis 5.0
«
Reply #7 on:
October 02, 2019, 11:02:41 »
It was a more complete answer indeed!
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
How to enable mobile version in new Elxis 5.0