Support/Kitsune/KB/WikiSyntax: Difference between revisions

→‎Browser: Updated selectors to reflect the state of things in SUMO 2.3.
(Added list of available abbreviations.)
(→‎Browser: Updated selectors to reflect the state of things in SUMO 2.3.)
 
(3 intermediate revisions by the same user not shown)
Line 21: Line 21:
* Spaces after the commas are optional.
* Spaces after the commas are optional.
* No {SHOWFOR(spans=on)/} or equivalent is necessary anymore; the {for} syntax is always enabled.
* No {SHOWFOR(spans=on)/} or equivalent is necessary anymore; the {for} syntax is always enabled.
* Headings which are hidden by {for} blocks do not appear in the page's table of contents. If the user causes them to show by manually selecting the right OS/browser combination, TOC entries will instantly appear.
* Headings which are hidden by {for} blocks do not appear in the page's table of contents. If the user causes them to show by manually selecting the right OS/browser combination, TOC entries instantly appear.


=== Available abbreviations ===
=== Available abbreviations ===
Line 36: Line 36:
* fx35 (Firefox 3.5 up to but not including 4)
* fx35 (Firefox 3.5 up to but not including 4)
* fx3 (3.0 up to but not including 3.5)
* fx3 (3.0 up to but not including 3.5)
* m11 (Fennec 1.1 up to but not including 2.0 (may be refined later))
* m4 (Any version of Firefox Mobile up to but not including 5 (may be refined later))
* m1 (Fennec < 1.1)


=== Inline and block-level contexts ===
=== Inline and block-level contexts ===
Line 56: Line 55:


=== "not" operator ===
=== "not" operator ===
Since the Knowledgebase will see the addition of new OSes and browser versions from time to time, we introduce a future-proof way of saying, for example, "any OS other than these". This is the role of the {for not} syntax.
Since the Knowledgebase will see the addition of new OSes and browser versions from time to time, we introduce a future-proof way of saying, for example, "any OS but these". This is the role of the {for not} syntax.


  Press the {for mac}Apple{/for}{for not mac}Control{/for} key.
  Press the {for not mac}Control{/for}{for mac}Apple{/for} key.


The addition of the word "not" causes the {for} contents to show when they would otherwise have hidden and vice versa. The above message would thus read "Control" on any system not running Mac OS.
The addition of the word "not" causes the {for} contents to show when they would otherwise have hidden and vice versa. The above message would thus read "Control" on any system not running Mac OS.


"not" can even be used with combinations of items:
"not" can also be used with combinations of items:


  {for not mac,win}You aren't using a Mac or Windows.{/for}
  {for not mac,win}You aren't using a Mac or Windows.{/for}
=== References ===
* [http://viewvc.svn.mozilla.org/vc/projects/sumo/trunk/scripts/showfor/config.php.dist?view=markup&pathrev=73086 Old SHOWFOR configuration file]
Confirmed users
574

edits