This article's documentation is for anything that uses the Source engine. Click here for more information.

Template:Expand/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 16: Line 16:


=== Examples ===
=== Examples ===
<code><nowiki>{{expand|{{MainPage}}}}</nowiki></code> renders as follows.
<code><nowiki>{{expand|{{:info_target}}}}</nowiki></code> renders as follows.
{{expand|{{MainPage}}}}
{{expand|{{:info_target}}}}




<code><nowiki>{{expand|{{MainPage}}|noborder=1}}</nowiki></code> renders as follows.
<code><nowiki>{{expand|{{:info_target}}|noborder=1}}</nowiki></code> renders as follows.
{{expand|{{MainPage}}|noborder=1}}
{{expand|{{:info_target}}|noborder=1}}





Revision as of 11:32, 28 August 2024

Edit-copy.png
This is a documentation subpage for Template:Expand.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Usage

Parameters

{{{1}}}The content to expand or hide.
{{{float}}}Set to left or right if floating is desired.
{{{title}}}An optional title shown next to the expand button.
{{{titlestyle}}}Adds extra title style parameters.
{{{noborder}}}If non-zero, use no border on the left.
Warning.pngWarning:It can become difficult to tell where the expanded text ends if the background colors are identical!
{{{color}}}The color of the left border and title, if used.
{{{startcollapsed}}}If set to 0, the content will initially be visible, otherwise collapsed. Default is 1.
{{{style}}}Adds style parameters for the table that this template is based on.
{{{styleoverride}}}Overrides ALL table style parameters. Not recommended unless you know what you are doing! Using this can break the template!
{{{titlestyleoverride}}}Overrides ALL title style parameters. Not recommended unless you know what you are doing! Using this can break the title!

Examples

{{expand|{{:info_target}}}} renders as follows.

Flag-white.pngEnglish (en)
Recycle-warning.png
This is a preserved entity in
If the game has round restart mechanics this entity may not behave as expected.
Info target.png
info_target is a point entity available in all Source Source games.
C++ Class hierarchy
CInfoTarget
CPointEntity
CBaseEntity
C++ beam_shared.cpp

It can be used by many different entities, and is a great generic target for any entity that needs to point, shoot, look at, or walk to a specific target.

It is primarily used for a target for other entities, similar to an info_null. An info_null is preferable to use as a point at target for spotlights, because an info_null is removed on map spawn, whereas an info_target remains. This entity can be placed with the Commentary Editor for changing the players view angles & position during a commentary.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

Transmit to client (respect PVS) : [1]
Always transmit to client (ignore PVS) : [2] (in all games since Left 4 Dead 2)

See Also


{{expand|{{:info_target}}|noborder=1}} renders as follows.

Flag-white.pngEnglish (en)
Recycle-warning.png
This is a preserved entity in
If the game has round restart mechanics this entity may not behave as expected.
Info target.png
info_target is a point entity available in all Source Source games.
C++ Class hierarchy
CInfoTarget
CPointEntity
CBaseEntity
C++ beam_shared.cpp

It can be used by many different entities, and is a great generic target for any entity that needs to point, shoot, look at, or walk to a specific target.

It is primarily used for a target for other entities, similar to an info_null. An info_null is preferable to use as a point at target for spotlights, because an info_null is removed on map spawn, whereas an info_target remains. This entity can be placed with the Commentary Editor for changing the players view angles & position during a commentary.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

Transmit to client (respect PVS) : [1]
Always transmit to client (ignore PVS) : [2] (in all games since Left 4 Dead 2)

See Also


{{expand|color=yellow|title=Yellow|Yellow!}} renders as follows.

Yellow
Yellow!


:{{expand|Can be indented.}} renders as follows.

Can be indented.


{{expand
|title=float{{=}}right
|float=right
|
The title alignment also uses {{param|float}} so that the button stays at the same position when toggling.
}}
float=right

The title alignment also uses {{{float}}} so that the button stays at the same position when toggling.

See how this renders on the right.