Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Convert
Wordpress to Elxis
with
Elxis importer
!
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Mobile support for extensions on 4.1 Poseidon
« previous
next »
Print
Pages: [
1
]
Author
Topic: Mobile support for extensions on 4.1 Poseidon (Read 3305 times)
nikos
Elxis Community
Hero Member
Posts: 1094
Mobile support for extensions on 4.1 Poseidon
«
on:
May 09, 2013, 13:29:45 »
I just saw the article
Elxis for mobiles and tablets
and i would like to ask if in the same logic which is indicated for template (creating a mobile.php file) we have to follow in order to make mobile friendly and an extension (module, plugin). Are you going to write a relative article for developers?
Logged
Elxis Community |
Open Source Web Lab
datahell
Elxis Team
Hero Member
Posts: 10345
Re: Mobile support for extensions on 4.1 Poseidon
«
Reply #1 on:
May 09, 2013, 20:06:48 »
No, you don't need to do so although you can if you want.
A module or a plugin is a small application you don't need special files. To display a mobile friendly version of it all you have to do is to check the value of the ELXIS_MOBILE constant and change your code (if needed).
if (ELXIS_MOBILE == 1) {
//display the mobile version
} else {
//display the desktop version
}
Most modules and plugins don't require changes in the HTML part.
By following a
responsive design
style you can create a good looking mobile version of your extension with just CSS without modifying the extension's code.
Example
.myext img { float:left; width:300px; }
@media only screen and (max-width:320px) {
.myext img { float:none; display:block; width:98%; }
}
You can use the
max-width
and the
max-device-width
properties for this purpose.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Mobile support for extensions on 4.1 Poseidon