Template:IfDesktop
Jump to navigation
Jump to search
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. |
Description
A simple if statement for detecting if the page is being displayed in desktop mode. This can be useful for getting around some of the limitations of mobile view by have 2 different bits of code for the 2 different views.
Note: Any desired use of = or | in the parameters will need to be replaced with {{=}} or {{!}} respectfully.
Syntax
{{ifDesktop|<1>|<2>}}
- 1
- Code block to use for Desktop Mode viewers.
- 2
- Code block to use for Mobile Mode viewers.
Sample
* {{ifDesktop|desktop code}} * {{ifDesktop|desktop code|mobile code}}
results in
- desktop code
- desktop code
See also
- {{IfMobile}}