On the Firefox Support knowledge base, if there is content in an article that only applies to Windows, Mac, Linux (or two of those three), or only applies to Firefox 2 or 3, you can make it only display for people on those operating systems or Firefox versions.
We do this by using a tikiwiki plugin called SHOWFOR. Just like tagging text as bold, you can tag text by operating system or Firefox version.
To use the SHOWFOR plugin, when you are editing a page, you must first make sure {SHOWFOR(spans=on)/} is at the top of the article markup. This enables the operating system and version selector at the top of the article.
For any content you want to assign to a specific set of operating systems, enclose it in {DIV}, with type=span, and class set to the operating system(s).
For example:
{DIV(class=mac,type=span)}Cmd{DIV}
The class names are:
| Windows | win |
| Mac OS | mac |
| Linux | unix |
| Windows and Mac OS | noUnix |
| Windows and Linux | noMac |
| Mac OS and Linux | noWin |
Some common instances:
EnterReturn
{DIV(class=noMac,type=span)}{TAG(tag=kbd)}Enter{TAG}{DIV}{DIV(class=mac,type=span)}{TAG(tag=kbd)}Return{TAG}{DIV}
Right-clickHold down the Ctrl key while you click
{DIV(class=noMac,type=span)}Right-click{DIV}{DIV(class=mac,type=span)}Hold down the {TAG(tag=kbd)}Ctrl{TAG} key while you click{DIV}
OptionsPreferences
{DIV(class=win,type=span)}Options{DIV}{DIV(class=noWin,type=span)}Preferences{DIV}
optionspreferences
{DIV(class=win,type=span)}options{DIV}{DIV(class=noWin,type=span)}preferences{DIV}
CtrlCmd
{DIV(class=noMac,type=span)}{TAG(tag=kbd)}Ctrl{TAG}{DIV}{DIV(class=mac,type=span)}{TAG(tag=kbd)}Cmd{TAG}{DIV}
Click Close the preferences window
{DIV(class=noMac,type=span)}Click {DIV(class=button,type=>span)}OK{DIV}{DIV}{DIV(class=mac,type=span)}Close the preferences window{DIV}
Unfortunately, lists and headings will not parse using spans. For those cases, we use the {SHOWFOR} tag.
For example:
{SHOWFOR(os=mac)}Cmd{SHOWFOR}
The OS names are:
| Windows | windows |
| Mac OS | mac |
| Linux | linux |
| Windows and Mac OS | mac+windows |
| Windows and Linux | linux+windows |
| Mac OS and Linux | linux+mac |
For different versions of Firefox, use {SHOWFOR(browser=firefox3)}.
| Firefox 2 | firefox2 |
| Firefox 3 | firefox3 |
In cases in which you need not os and browser, separate them with a comma.
For example:
{SHOWFOR(browser=firefox3,os=mac)}Cmd{SHOWFOR}
Many pages make use of the dynamic content feature in Firefox Support. We have created content blocks which use SHOWFOR. You can see them at Dynamic Content.
Note: We now use label, not id.
Currently, we need {SHOWFOR(spans=on)/} at the top of each page; so we can't switch the content IDs until we know that all pages that use Content IDs have {SHOWFOR(spans=on)/}.
If you're having problems with SHOWFOR working properly, it may be one of these bugs.
Still need help? Ask a support question.
Help us improve this article. Submit additional feedback.