Templates list
From Synfig Studio :: Documentation
(PagenameFromLink template description) |
m (better title) |
||
(20 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Title|Templates list}} | ||
+ | {{Navigation|Writer_Documentation|}} | ||
+ | {{TOCright}} | ||
+ | |||
+ | Here's a list of templates used to improve this wiki functionality. | ||
+ | |||
+ | = User Templates = | ||
+ | Those templates can (and often should) be used in page body. | ||
+ | |||
+ | == C == | ||
+ | * '''Location''': {{l|Template:C}} | ||
+ | * '''Description''': This template should always be used to ‘wrap’ items from the context menu GUI. | ||
+ | * '''Examples''': <nowiki>{{c|File|Open File}}</nowiki> is interpreted as {{c|File|Open File}} | ||
+ | |||
+ | == Category == | ||
+ | * '''Location''': {{l|Template:Category}} | ||
+ | * '''Description''': Specifies category page belongs to. | ||
+ | * '''Examples''': <nowiki>{{Category|MyCategory}}</nowiki>. | ||
+ | |||
+ | == CategoryContents == | ||
+ | * '''Location''': {{l|Template:CategoryContents}} | ||
+ | * '''Description''': Lists all pages in the specified category. Output is localized, so if you use <nowiki>{{CategoryContents|Example}}</nowiki> on Spanish page, you will automatically get content of Example/es category and the page titles will be replaced with their Spanish translations. | ||
+ | * '''Examples''': <nowiki>{{CategoryContents|MyCategory}}</nowiki>. | ||
+ | |||
+ | == L == | ||
+ | * '''Location''': {{l|Template:L}} | ||
+ | * '''Description''': Creates link to another page, providing proper localization support. | ||
+ | * '''Examples''': See {{l|Meta:LinksTest/ru|Meta:LinksTest/ru}}. | ||
+ | |||
+ | == Literal == | ||
+ | * '''Location''': {{l|Template:Literal}} | ||
+ | * '''Description''': This template should always be used to ‘wrap’ all reference to GUI items (control name, menu item, …). | ||
+ | * '''Examples''': <nowiki>{{Literal|Open File|New}}</nowiki> is interpreted as {{Literal|Open File}} | ||
+ | |||
+ | == Navigation == | ||
+ | * '''Location''': {{l|Template:Navigation}} | ||
+ | * '''Description''': Defines navigation for sequence of pages and displays navigation bar. You need only to specify parent (index) page and next page (optional). There's no need to specify previous page, because it's determined automatically. Works only within the range of namespace though. | ||
+ | * '''Examples''': For result see the header from those page, or result example code <nowiki>{{Navigation|Top Page|Next Page}}</nowiki> : | ||
+ | |||
+ | {{Navigation|Top Page|Next Page}} | ||
+ | |||
+ | |||
+ | == Note == | ||
+ | * '''Location''': {{l|Template:Note}} | ||
+ | * '''Description''': This template gives a box of fixed width. First argument is header for note and second a main content of note. | ||
+ | * '''Examples''': <nowiki>{{Note|Note title|Short note text}}</nowiki> See in ex. {{l|Doc:Getting_Started}} or note from example: | ||
+ | |||
+ | {{Note|Note title|Short note text}} | ||
+ | |||
+ | |||
+ | == Shorcut == | ||
+ | * '''Location''': {{l|Template:Shortcut}} | ||
+ | * '''Description''': Put a sequence of up to 5 keys to show a shortcut. | ||
+ | * '''Examples''': <nowiki>{{Shortcut|Alt|Shift|t}}</nowiki> is interpreted as {{Shortcut|Alt|Shift|t}} | ||
+ | |||
+ | == Stub == | ||
+ | * '''Location''': {{l|Template:Stub}} | ||
+ | * '''Description''': Mark page as a stub. | ||
+ | * '''Examples''': <nowiki>{{Stub}}</nowiki>. | ||
+ | |||
+ | == Title == | ||
+ | * '''Location''': {{l|Template:Title}} | ||
+ | * '''Description''': Sets custom title for a page. | ||
+ | * '''Examples''': See sources of {{l|Main_Page|Main_Page}}, {{l|Doc:Getting_Started|Doc:Getting_Started}}, {{l|Doc:Getting_Started/ru|Doc:Getting_Started/ru}} pages. | ||
+ | |||
+ | == TOCright == | ||
+ | * '''Location''': {{l|Template:TOCright}} | ||
+ | * '''Description''': Set the Table Of Content to the right side of the page. | ||
+ | * '''Examples''': <nowiki>{{TOCright}}</nowiki>. Mainly on every pages. Please use it when the page's TOC start to fill too much space. | ||
+ | |||
+ | = Internal Templates = | ||
+ | Templates below are not intended for direct use in page body. They are usually invoked by high-level templates listed above. | ||
+ | |||
+ | == ! == | ||
+ | * '''Location''': {{l|Template:!}} | ||
+ | * '''Description''': This is an auxiliary template allowing one to encode "<code>|</code>" | ||
+ | within template and parser function parameters. {{L|Template:!|More...}} | ||
+ | * '''Examples''': | ||
+ | {| width="100%" | ||
+ | |+ | ||
+ | |'''Code:''' | ||
+ | |'''Result:''' | ||
+ | |'''Comments:''' | ||
+ | |- | ||
+ | |<nowiki>{{!}}</nowiki> | ||
+ | |<nowiki>|</nowiki> | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | == GetTitle == | ||
+ | * '''Location''': {{l|Template:GetTitle}} | ||
+ | * '''Description''': Returns custom title of a page set with <nowiki>{{</nowiki>Title<nowiki>}}</nowiki> template in the page body. | ||
+ | * '''Examples''': | ||
+ | {| width="100%" | ||
+ | |+ | ||
+ | |'''Code:''' | ||
+ | |'''Result:''' | ||
+ | |'''Comments:''' | ||
+ | |- | ||
+ | |<nowiki>{{GetTitle|Doc:Getting_Started/ru}}</nowiki> | ||
+ | |Первые шаги | ||
+ | |Look at the source of {{l|Doc:Getting_Started/ru|Doc:Getting_Started/ru}} page. | ||
+ | |} | ||
+ | |||
+ | == Languages == | ||
+ | * '''Location''': {{l|Template:Languages}} | ||
+ | * '''Description''': Displays bar listing available translations for current page. {{l|Template:Languages|More...}} | ||
+ | * '''Examples''': <nowiki>{{{Languages}}}</nowiki> | ||
+ | |||
+ | == Languages/Lang == | ||
+ | * '''Location''': {{l|Template:Languages/Lang}} | ||
+ | * '''Description''': Utility template for language bar. Generates link to specified translation of current page if it's exists. | ||
+ | * '''Examples''': | ||
+ | {| width="100%" | ||
+ | |+ | ||
+ | |'''Code:''' | ||
+ | |'''Result:''' | ||
+ | |'''Comments:''' | ||
+ | |- | ||
+ | |<nowiki>{{Languages/Lang|en}}</nowiki> | ||
+ | |{{Languages/Lang|en}} | ||
+ | |Result is "English", but without a link, because current page is in English | ||
+ | |- | ||
+ | |<nowiki>{{Languages/Lang|es}}</nowiki> | ||
+ | |{{Languages/Lang|es}} | ||
+ | |Result is empty, because this page have no Spanish translation. If it does, then the result would be: " • {{l|Meta:Templates/es|Español}}" | ||
+ | |- | ||
+ | |<nowiki>{{Languages/Lang|ru}}</nowiki> | ||
+ | |{{Languages/Lang|ru}} | ||
+ | |Result is empty, because this page have no Russian translation. If it does, then the result would be: " • {{l|Meta:Templates/ru|Русский}}" | ||
+ | |} | ||
+ | |||
+ | == Languages/ThisPageTranslatedIn == | ||
+ | * '''Location''': {{l|Template:Languages/ThisPageTranslatedIn}} | ||
+ | * '''Description''': Utility template for language bar. Returns a page name which translates current page to specified language. | ||
+ | * '''Examples''': | ||
+ | {| width="100%" | ||
+ | |+ | ||
+ | |'''Code:''' | ||
+ | |'''Result:''' | ||
+ | |'''Comments:''' | ||
+ | |- | ||
+ | |<nowiki>{{Languages/ThisPageTranslatedIn|en}}</nowiki> | ||
+ | |{{Languages/ThisPageTranslatedIn|en}} | ||
+ | |If this template invoked from Meta:Templates/es, then result is the same ("/es" suffix automatically dropped) | ||
+ | |- | ||
+ | |<nowiki>{{Languages/ThisPageTranslatedIn|ru}}</nowiki> | ||
+ | |{{Languages/ThisPageTranslatedIn|ru}} | ||
+ | |If this template invoked from Meta:Templates/es, then result is the same ("/es" suffix automatically dropped and "/ru" suffix added) | ||
+ | |} | ||
+ | |||
+ | == Navigation/PreviousPage == | ||
+ | * '''Location''': {{l|Template:Navigation/PreviousPage}} | ||
+ | * '''Description''': Searches for previous page for current one and outputs its name. | ||
+ | |||
== PagenameFromLink == | == PagenameFromLink == | ||
* '''Location''': {{l|Template:PagenameFromLink}} | * '''Location''': {{l|Template:PagenameFromLink}} | ||
* '''Description''': Extracts page name from given link. | * '''Description''': Extracts page name from given link. | ||
* '''Examples''': | * '''Examples''': | ||
− | {| | + | {| width="100%" |
|+ | |+ | ||
|'''Code:''' | |'''Code:''' | ||
|'''Result:''' | |'''Result:''' | ||
+ | |'''Comments:''' | ||
|- | |- | ||
|<nowiki>{{PagenameFromLink|Doc:Getting_Started#Introduction}}</nowiki> | |<nowiki>{{PagenameFromLink|Doc:Getting_Started#Introduction}}</nowiki> | ||
Line 17: | Line 173: | ||
|Category:Manual | |Category:Manual | ||
|} | |} | ||
+ | |||
+ | == Title.dpl == | ||
+ | * '''Location''': {{l|Template:Title.dpl}} | ||
+ | * '''Description''': Utility template used by [[#GetTitle|GetTitle]] template and DPL for page title extraction. See [http://semeb.com/dpldemo/index.php?title=DPL:Manual_-_DPL_parameters:_Controlling_output_volume#include_contents_related_to_templates this link]. | ||
+ | |||
+ | |||
+ | == Title.dpl.default == | ||
+ | * '''Location''': {{l|Template:Title.dpl.default}} | ||
+ | * '''Description''': Utility template used by [[#GetTitle|GetTitle]] template and DPL for page title extraction. See [http://semeb.com/dpldemo/index.php?title=DPL:Manual_-_DPL_parameters:_Controlling_output_volume#include_contents_related_to_templates this link]. | ||
+ | |||
+ | = Warning banners = | ||
+ | |||
+ | == Warnings == | ||
+ | * '''Location''': {{l|Template:Warnings}} | ||
+ | * '''Description''': Contains list of displayed warning banners and conditions for them | ||
+ | |||
+ | == OldTerminologyTranslation == | ||
+ | * '''Location''': {{l|Template:OldTerminologyTranslation}} | ||
+ | * '''Description''': Outdated terminology for translated page banner |
Latest revision as of 13:14, 20 April 2017
Here's a list of templates used to improve this wiki functionality.
User Templates
Those templates can (and often should) be used in page body.
C
- Location: Template:C
- Description: This template should always be used to ‘wrap’ items from the context menu GUI.
- Examples: {{c|File|Open File}} is interpreted as "File → Open File"
Category
- Location: Template:Category
- Description: Specifies category page belongs to.
- Examples: {{Category|MyCategory}}.
CategoryContents
- Location: Template:CategoryContents
- Description: Lists all pages in the specified category. Output is localized, so if you use {{CategoryContents|Example}} on Spanish page, you will automatically get content of Example/es category and the page titles will be replaced with their Spanish translations.
- Examples: {{CategoryContents|MyCategory}}.
L
- Location: Template:L
- Description: Creates link to another page, providing proper localization support.
- Examples: See Meta:LinksTest/ru.
Literal
- Location: Template:Literal
- Description: This template should always be used to ‘wrap’ all reference to GUI items (control name, menu item, …).
- Examples: {{Literal|Open File|New}} is interpreted as "Open File"
- Location: Template:Navigation
- Description: Defines navigation for sequence of pages and displays navigation bar. You need only to specify parent (index) page and next page (optional). There's no need to specify previous page, because it's determined automatically. Works only within the range of namespace though.
- Examples: For result see the header from those page, or result example code {{Navigation|Top Page|Next Page}} :
Note
- Location: Template:Note
- Description: This template gives a box of fixed width. First argument is header for note and second a main content of note.
- Examples: {{Note|Note title|Short note text}} See in ex. Getting Started or note from example:
Note title Short note text
|
Shorcut
- Location: Template:Shortcut
- Description: Put a sequence of up to 5 keys to show a shortcut.
- Examples: {{Shortcut|Alt|Shift|t}} is interpreted as Alt⇧ ShiftT
Stub
- Location: Template:Stub
- Description: Mark page as a stub.
- Examples: {{Stub}}.
Title
- Location: Template:Title
- Description: Sets custom title for a page.
- Examples: See sources of Main_Page, Doc:Getting_Started, Doc:Getting_Started/ru pages.
TOCright
- Location: Template:TOCright
- Description: Set the Table Of Content to the right side of the page.
- Examples: {{TOCright}}. Mainly on every pages. Please use it when the page's TOC start to fill too much space.
Internal Templates
Templates below are not intended for direct use in page body. They are usually invoked by high-level templates listed above.
!
- Location: Template:!
- Description: This is an auxiliary template allowing one to encode "
|
"
within template and parser function parameters. More...
- Examples:
Code: | Result: | Comments: |
{{!}} | | |
GetTitle
- Location: Template:GetTitle
- Description: Returns custom title of a page set with {{Title}} template in the page body.
- Examples:
Code: | Result: | Comments: |
{{GetTitle|Doc:Getting_Started/ru}} | Первые шаги | Look at the source of Doc:Getting_Started/ru page. |
Languages
- Location: Template:Languages
- Description: Displays bar listing available translations for current page. More...
- Examples: {{{Languages}}}
Languages/Lang
- Location: Template:Languages/Lang
- Description: Utility template for language bar. Generates link to specified translation of current page if it's exists.
- Examples:
Code: | Result: | Comments: |
{{Languages/Lang|en}} | English | Result is "English", but without a link, because current page is in English |
{{Languages/Lang|es}} | Result is empty, because this page have no Spanish translation. If it does, then the result would be: " • Español" | |
{{Languages/Lang|ru}} | Result is empty, because this page have no Russian translation. If it does, then the result would be: " • Русский" |
Languages/ThisPageTranslatedIn
- Location: Template:Languages/ThisPageTranslatedIn
- Description: Utility template for language bar. Returns a page name which translates current page to specified language.
- Examples:
Code: | Result: | Comments: |
{{Languages/ThisPageTranslatedIn|en}} | Meta:Templates | If this template invoked from Meta:Templates/es, then result is the same ("/es" suffix automatically dropped) |
{{Languages/ThisPageTranslatedIn|ru}} | Meta:Templates/ru | If this template invoked from Meta:Templates/es, then result is the same ("/es" suffix automatically dropped and "/ru" suffix added) |
- Location: Template:Navigation/PreviousPage
- Description: Searches for previous page for current one and outputs its name.
PagenameFromLink
- Location: Template:PagenameFromLink
- Description: Extracts page name from given link.
- Examples:
Code: | Result: | Comments: |
{{PagenameFromLink|Doc:Getting_Started#Introduction}} | Doc:Getting_Started | |
{{PagenameFromLink|layers}} | Layers | |
{{PagenameFromLink|:Category:Manual}} | Category:Manual |
Title.dpl
- Location: Template:Title.dpl
- Description: Utility template used by GetTitle template and DPL for page title extraction. See this link.
Title.dpl.default
- Location: Template:Title.dpl.default
- Description: Utility template used by GetTitle template and DPL for page title extraction. See this link.
Warning banners
Warnings
- Location: Template:Warnings
- Description: Contains list of displayed warning banners and conditions for them
OldTerminologyTranslation
- Location: Template:OldTerminologyTranslation
- Description: Outdated terminology for translated page banner