Template:Deprecated/doc: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens
No edit summary
Adding categories
 
Line 1: Line 1:
{{Documentation subpage}}
This template marks an object, or a member of an object, as deprecated. It displays a red box indicating that the object has been deprecated and adds the [[:Category:Deprecated items|Deprecated items]] category to the page. It should only be used if the object browser itself marks the object as deprecated.
This template marks an object, or a member of an object, as deprecated. It displays a red box indicating that the object has been deprecated and adds the [[:Category:Deprecated items|Deprecated items]] category to the page. It should only be used if the object browser itself marks the object as deprecated.
== Usage ==
== Usage ==
 
<nowiki>{{</nowiki>deprecated[|'''text'''][|alternative='''alternative''']<nowiki>}}</nowiki>
<nowiki>{{</nowiki>deprecated[|'''text'''][|alternative='''alternative''']<nowiki>}}</nowiki>


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 ==
;alternative
;alternative
:The alternative to use, if there is one. Usually, this will be a link to another property, method, event or object.
: The alternative to use, if there is one. Usually, this will be a link to another property, method, event or object.
;1
;1
:Additional information about the deprecation. <strong>Do not use this to indicate an alternative, use the alternative argument instead.</strong>
: Additional information about the deprecation. <strong>Do not use this to indicate an alternative, use the alternative argument instead.</strong>
== Examples ==
This is an example of what could be put on the page of the [[children]] method:


== Examples ==
{{Tlx|deprecated|2=alternative=<nowiki>[[GetChildren]]</nowiki>}}


This is an example of what could be put on the page of the [[children]] method:
{{tlx|deprecated|2=alternative=<nowiki>[[GetChildren]]</nowiki>}}
And this is an example of what could be put on the page of the [[Remove]] method:
And this is an example of what could be put on the page of the [[Remove]] method:
{{tlx|deprecated|Use <nowiki>[[ClearAllChildren]]</nowiki> to get rid of all child objects, or <nowiki>[[Destroy]]</nowiki> to invalidate  this object and its descendants.}}
 
{{Tlx|deprecated|Use <nowiki>[[ClearAllChildren]]</nowiki> to get rid of all child objects, or <nowiki>[[Destroy]]</nowiki> to invalidate  this object and its descendants.}}
<includeonly>
[[Category:Templates]]
</includeonly>

Latest revision as of 23:31, 29 May 2023

Documentation subpage icon

This is a documentation subpage for Template:Deprecated.
It contains usage information, categories and other content that is not part of the original template page.

This template marks an object, or a member of an object, as deprecated. It displays a red box indicating that the object has been deprecated and adds the Deprecated items category to the page. It should only be used if the object browser itself marks the object as deprecated.

Usage

{{deprecated[|text][|alternative=alternative]}}

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

alternative
The alternative to use, if there is one. Usually, this will be a link to another property, method, event or object.
1
Additional information about the deprecation. Do not use this to indicate an alternative, use the alternative argument instead.

Examples

This is an example of what could be put on the page of the children method:

{{deprecated|alternative=[[GetChildren]]}}

And this is an example of what could be put on the page of the Remove method:

{{deprecated|Use [[ClearAllChildren]] to get rid of all child objects, or [[Destroy]] to invalidate this object and its descendants.}}