Template:Event/doc: Difference between revisions
>JulienDethurens Created page with "This template is used to document events. It should only be used to document events that are part of the ROBLOX API. == Usage == <nowiki><onlyinclude>{{</nowiki>Event |nam..." |
Adding categories |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Documentation subpage}} | |||
This template is used to document events. It should only be used to document events that are part of the ROBLOX API. | This template is used to document events. It should only be used to document events that are part of the ROBLOX API. | ||
== Usage == | == Usage == | ||
<only<nowiki></nowiki>include>{{Event | |||
<nowiki>< | |||
|name='''name''' | |name='''name''' | ||
|description='''description''' | |description='''description''' | ||
|arguments='''arguments''' | [|arguments='''arguments'''] | ||
[|protected='''bool'''] | [|protected='''bool'''] | ||
[|object='''object'''] | [|object='''object'''] | ||
[|objects='''objects'''] | [|objects='''objects'''] | ||
<nowiki>}}</ | <nowiki>}}</only</nowiki>include> | ||
Note: text between brackets ([ and ]) is optional, text in bold represents a certain value (something you must replace) and the rest represents things that must be present as-is. | Note: text between brackets ([ and ]) is optional, text in bold represents a certain value (something you must replace) and the rest represents things that must be present as-is. | ||
== Parameters == | == Parameters == | ||
;name | ;name | ||
:The name of the event. | : The name of the event. | ||
;arguments | ;arguments | ||
:The arguments given by the event. See the section on [[#arguments|arguments]] for more info on arguments. | : The arguments given by the event. See the section on [[#arguments|arguments]] for more info on arguments. | ||
;description | ;description | ||
:A description of the event. | : A description of the event. | ||
;protected | ;protected | ||
:If specified, the icon of the event will indicate that the event is protected. | : If specified, the icon of the event will indicate that the event is protected. | ||
;object | ;object | ||
:The name of the object this event belongs to, if there is only one. Otherwise, use the objects argument. | : The name of the object this event belongs to, if there is only one. Otherwise, use the objects argument. | ||
;objects | ;objects | ||
:Links to the objects this event belongs to, if there are more than one. Otherwise, use the object argument. | : Links to the objects this event belongs to, if there are more than one. Otherwise, use the object argument. | ||
== Arguments == | == Arguments == | ||
Arguments should be separated by commas. Their type should <strong>always</strong> be written before their name and should <strong>always</strong> be identical to the one written in the object browser. The type should either be in raw text, either be a link to the page of the type or either be displayed with the {{Tl|Type}} template. The name should always either be contained in a {{Tag|var}} tag, which is preferrable, either be italicized with wiki markup. | |||
Default values for arguments should be indicated outside of the {{Tag|var}} or outside of the italicization and be indicated the same way as they are in the object browser. | |||
Default values for arguments should be indicated outside of the {{ | |||
== Notes == | == Notes == | ||
* The event should always be at the top of the page. | |||
*The event should always be at the top of the page. | * If you need to put things after the event, make sure to use the {{Tl|Clear floats}} template between the event and the rest of the page. | ||
*If you need to put things after the event, make sure to use the {{ | * All events should be categorized under the [[:Category:Events|Events]] category. | ||
*All events should be categorized under the [[:Category:Events|Events]] category. | <includeonly> | ||
[[Category:Templates]] | |||
</includeonly> |
Latest revision as of 23:33, 29 May 2023
This is a documentation subpage for Template:Event.
It contains usage information, categories and other content that is not part of the original template page.
This template is used to document events. It should only be used to document events that are part of the ROBLOX API.
Usage
<onlyinclude>{{Event |name=name |description=description [|arguments=arguments] [|protected=bool] [|object=object] [|objects=objects] }}</onlyinclude>
Note: text between brackets ([ and ]) is optional, text in bold represents a certain value (something you must replace) and the rest represents things that must be present as-is.
Parameters
- name
- The name of the event.
- arguments
- The arguments given by the event. See the section on arguments for more info on arguments.
- description
- A description of the event.
- protected
- If specified, the icon of the event will indicate that the event is protected.
- object
- The name of the object this event belongs to, if there is only one. Otherwise, use the objects argument.
- objects
- Links to the objects this event belongs to, if there are more than one. Otherwise, use the object argument.
Arguments
Arguments should be separated by commas. Their type should always be written before their name and should always be identical to the one written in the object browser. The type should either be in raw text, either be a link to the page of the type or either be displayed with the {{Type}} template. The name should always either be contained in a <var> tag, which is preferrable, either be italicized with wiki markup.
Default values for arguments should be indicated outside of the <var> or outside of the italicization and be indicated the same way as they are in the object browser.
Notes
- The event should always be at the top of the page.
- If you need to put things after the event, make sure to use the {{Clear floats}} template between the event and the rest of the page.
- All events should be categorized under the Events category.