Template documentation
|
|---|
| Note: portions of the template sample may not be visible without values provided. |
| View or edit this documentation. (About template documentation) |
| Editors can experiment in this template's sandbox and test case pages. |
Template and Documentation Credit: My Time at Sandrock Wiki.
Description
"If" statement to detect if the page is being displayed in mobile mode. This can be used to get around mobile view limitations by allowing use to have two different codes: one for mobile, one for desktop.
Note: Any desired use of = or | in the parameters will need to be replaced with {{=}} or {{!}} respectfully.
Syntax
{{IfMobile|<1>|<2>}}
- 1
- Code block to use for Mobile Mode viewers.
- 2
- Code block to use for Desktop Mode viewers.
Example
* {{IfMobile|mobile code}}
* {{IfMobile|mobile code|desktop code}}
results in
- desktop code