:Tmpv/설명문서

위키백과, 우리 모두의 백과사전.

용도[편집]

본 틀의 역할은 특정 문서 내 삽입된 틀의 변수 입력값 (문자·숫자)를 취해오는 것입니다. 예를 들어서 어느 한 TV 프로그램 문서에 삽입된 {{텔레비전 프로그램 정보}}의 |방송 횟수= 입력값을 가져와서 다른 문서에 내보일 수 있습니다.

이 틀은 문자와 숫자 변수값에 한하여 작동합니다. {{시작 날짜}}의 첫 변수값 (연도값)만 취해오는 식입니다. 또 영어 변수 명칭의 경우에는 대문자와 소문자를 구분합니다. 해당 문서 내에 변수가 존재하고 있고 그 변수의 명칭을 정확히 입력해야 작동한다는 점에 유의하시기 바랍니다.

기본 사용법[편집]

{{Tmpv|(문서명)|(틀명칭)|(몇번째틀)|(변수명)|(몇번째변수)}}

예제[편집]

24th usage of |OriginalAirDate= in the 3rd usage of {{Episode table}} in List of Lucifer episodes
{{Template parameter value|List of Lucifer episodes|Episode table|3|OriginalAirDate|24}}
2nd usage of |archiveurl= in the 1st usage of {{Series overview}} in List of Agents of S.H.I.E.L.D. episodes
{{Template parameter value|List of Agents of S.H.I.E.L.D. episodes|Series overview||archive-url|2}}
1st usage of |LineColor= in the 2nd usage of {{Episode list/sublist}} in Vikings (season 4)
{{Template parameter value|Vikings (season 4)|Episode list/sublist|2|LineColor}}
1st usage of |num_episodes= in the 1st usage of {{Infobox television}} in 12 Monkeys (TV series)
{{Template parameter value|12 Monkeys (TV series)|Infobox television||num_episodes}}
3rd parameter in the 8th usage of {{Start date}} in The Big Bang Theory
{{Template parameter value|The Big Bang Theory|Start date|8|3}}

틀 데이터[편집]

A template to grab the value of parameters from templates on a page

틀 변수

이 틀은 한 줄로 쓰는 것이 권장됩니다.

변수설명형식상태
Page1

The page to grab templates from

문서 이름필수
Template2

The template to look for in the target page

문자열필수
Template index3

Which occurence of the template to check for parameters in

숫자선택 사항
Parameter4

The name of the parameter to check for

문자열필수
Parameter index5

Which occurence of the parameter to check for in the template. Does not apply if "Ignore subtemplates" is used

숫자선택 사항
Ignore subtemplatesignore_subtemplates ist

Giving this a value will make the template ignores subtemplates and their parameters when looking for a value in a template. Can be used for more precise grabbing of parameters as opposed to using a parameter index

기본값
no
부울식선택 사항
Ignore blank valuesignore_blank

Ignores keys with blank values when deciding which index of a parameter to use. This option does nothing when using ignore_subtemplates

기본값
no
부울식선택 사항
Only subtemplatesonly_subtemplates

The inverse to ignore_subtemplates. Only keys that are in subtemplates of the template requested will be considered. ignore_subtemplates will take precedence over this option if both are enabled

기본값
no
부울식선택 사항
Don't processdontprocess

If enabled, the returning result won't be processed into wikitext, and will be returned as raw data.

기본값
no
부울식선택 사항
Treat as regextreat_as_regex

Treats the Templates input as a lua regex instead of a raw string

기본값
no
부울식선택 사항

See also[편집]

  • {{get parameter}}, another template doing the same thing with a different set of limitations