This wiki is a XML full dump clone of "Heroes Wiki", the main wiki about the Heroes saga that has been shut down permanently since June 1, 2020. The purpose of this wiki is to keep online an exhaustive and accurate database about the franchise.

Template:Eps: Difference between revisions

From Heroes Wiki
Jump to navigation Jump to search
imported>MiamiVolts
mNo edit summary
imported>MiamiVolts
mNo edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{blurb}}Warning: This template is still being debugged.{{blurbclose}}</noinclude><includeonly>{{#if:{{{2|}}}
<includeonly>{{#if:{{{2|}}}|{{#switch:{{{2}}}|epn = {{epn|{{{1}}}}}|epp = {{#sub:{{epp|{{{1}}}}}|0|-1}}|{{ep|{{{1}}}}}<!--end template switch-->}}
|{{#switch:{{{2}}}|epn = {{User:MiamiVolts/Epn|{{{1}}}}}|epp = {{#sub:{{Epp|{{{1}}}}}|0|-1}}|{{User:MiamiVolts/test|{{{1}}}}}<!--end template switch-->}}
|<!--else-->{{ep|{{{1}}}}}
|<!--else-->{{User:MiamiVolts/test|{{{1}}}}}
<!--end if-->}}<!-- add the subtitle text if subtitle has length and is a valid subtitle
<!--end if-->}}<!-- add the subtitle text if subtitle has length and is a valid subtitle
-->{{#switch:{{#sub:{{{1|}}}|0|2}}
-->{{#switch:{{#sub:{{{1|}}}|0|2}}
|gn = {{User:MiamiVolts/Eps/subtitle|{{{1|}}}|slist = {{#dpl:|debug=1|category=Issues|uses=Template:Graphic Novel sidebar|include={Graphic Novel sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&rarr;«!--[[%PAGE%|%TITLE%]]--»,}}|tlist = {{#dpl:|debug=1|category=Issues|uses=Template:Graphic Novel sidebar|include={Graphic Novel sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&larr;*²{#pad:%NR%¦3¦0}²[[%PAGE%|%TITLE%]]«!--,--»}}|semi = {{{semi|}}}}}
|gn = {{eps/subtitle|eplink={{ep|{{{1|}}}}}|slist = {{#dpl:|debug=1|category=Issues|uses=Template:Graphic Novel sidebar|include={Graphic Novel sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&rarr;«!--[[%PAGE%|<span style="white-space: nowrap;">%TITLE%</span>]]--»,}}|tlist = {{#dpl:|debug=1|category=Issues|uses=Template:Graphic Novel sidebar|include={Graphic Novel sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&larr;*²{#pad:%NR%¦3¦0}²[[%PAGE%|<span style="white-space: nowrap;">%TITLE%</span>]]«!--,--»}}|semi = {{{semi|}}}}}
|wb = {{User:MiamiVolts/Eps/subtitle|{{{1|}}}|slist = {{#dpl:|debug=1|category=Issues|uses=Template:Webisode sidebar|include={Webisode sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&rarr;«!--[[%PAGE%|%TITLE%]]--»,}}|tlist = {{#dpl:|debug=1|category=Issues|uses=Template:Webisode sidebar|include={Webisode sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&larr;*²{#pad:%NR%¦3¦0}²[[%PAGE%|%TITLE%]]«!--,--»}}|semi = {{{semi|}}}}}
|wb = {{eps/subtitle|eplink={{ep|{{{1|}}}}}|slist = {{#dpl:|debug=1|category=Webisodes|uses=Template:Webisode sidebar|include={Webisode sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&rarr;«!--[[%PAGE%|<span style="white-space: nowrap;">%TITLE%</span>]]--»,}}|tlist = {{#dpl:|debug=1|category=Webisodes|uses=Template:Webisode sidebar|include={Webisode sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&larr;*²{#pad:%NR%¦3¦0}²[[%PAGE%|<span style="white-space: nowrap;">%TITLE%</span>]]«!--,--»}}|semi = {{{semi|}}}}}
|<!--episode-->{{User:MiamiVolts/Eps/subtitle|{{{1|}}}|slist = {{#dpl:|debug=1|category=Issues|uses=Template:Episode sidebar|include={Episode sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&rarr;«!--[[%PAGE%|%TITLE%]]--»,}}|tlist = {{#dpl:|debug=1|category=Issues|uses=Template:Episode sidebar|include={Episode sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&larr;*²{#pad:%NR%¦3¦0}²[[%PAGE%|%TITLE%]]«!--,--»}}|semi = {{{semi|}}}}}
|<!--episode-->{{eps/subtitle|eplink={{ep|{{{1|}}}}}|slist = {{#dpl:|debug=1|category=Episodes|uses=Template:Episode sidebar|include={Episode sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&rarr;«!--[[%PAGE%|<span style="white-space: nowrap;">%TITLE%</span>]]--»,}}|tlist = {{#dpl:|debug=1|category=Episodes|uses=Template:Episode sidebar|include={Episode sidebar}:subtitle|includematch=/subtitle[^{{pipe}}]*/|format=,&larr;*²{#pad:%NR%¦3¦0}²[[%PAGE%|<span style="white-space: nowrap;">%TITLE%</span>]]«!--,--»}}|semi = {{{semi|}}}}}
<!--end switch-->}}<!--if epp mode, append a closing parenthesis
<!--end switch-->}}<!--if epp mode, append a closing parenthesis
-->{{#ifeq:{{{2|}}}|epp|)}}</includeonly><noinclude><pre>
-->{{#ifeq:{{{2|}}}|epp|)}}</includeonly><noinclude>
Old code:
{{#ifexpr:{{#rpos:{{User:MiamiVolts/Eps/subtitle|{{{1}}}}}|:}} > 0|<!--add nothing-->|{{#ifeq:{{User:MiamiVolts/Eps/subtitle|{{{1|}}}}}|<!--empty string-->|{{link
    |{{#sub:{{User:MiamiVolts/Epn|{{{1}}}}}X|{{#expr:36+{{#rpos:{{User:MiamiVolts/Epn|{{{1}}}}}|{{pipe}}}}}}|-10}}
    |text={{#if: {{{semi|}}}|;|:}}&nbsp;{{User:MiamiVolts/Eps/subtitle|{{{1}}}}}
  }}|<!--add nothing-->
<!--end ifeq-->}}<!--end ifexpr-->}}
 
</pre>
==Usage==
==Usage==
This is a link template that uses DPL to provide a link for the specified ''Heroes''-related title with subtitle, if any. By default, appends subtitle after a colon and space as is standard for NBC and other style guidelines; but an option is available to use a semicolon instead of a colon. The list of titles used in this template are listed in {{[[template:ep|ep]]}}. Options are also available to use the namespace format like {{[[User:MiamiVolts/Epn|epn]]}} or parentheses format like {{[[template:epp|epp]]}}. Note: this function uses 2 DPL calls to get the data. The parsing is done using the subtemplate {{[[User:MiamiVolts/Eps/subtitle|eps/subtitle]]}}.
This is a link template that uses DPL to provide a link for the specified ''Heroes''-related title with subtitle, if any. By default, appends subtitle after a colon and space as is standard for NBC and other style guidelines; but an option is available to use a semicolon instead of a colon. The list of titles used in this template are listed in {{[[template:ep|ep]]}}. Options are also available to use the namespace format like {{[[Template:epn|epn]]}} or parentheses format like {{[[template:epp|epp]]}}. Note: this function uses 2 DPL calls to get the data. The parsing is done using the subtemplate {{[[Template:eps/subtitle|eps/subtitle]]}}.
===Syntax===
===Syntax===
<pre>
<pre>
Line 29: Line 20:


===Examples===
===Examples===
Due to DPL restrictions on recursion, examples cannot be provided in the same article as the template itself so are provided on the [[User talk:MiamiVolts/Eps|related talk page]] instead.
Due to DPL restrictions on recursion, examples cannot be provided in the same article as the template itself so are provided on the [[Template talk:Eps|related talk page]] instead.


{{nousercat|Link Templates}}
{{nousercat|Link Templates}}
{{nousercat|DPL Templates}}
</noinclude>
</noinclude>

Latest revision as of 13:42, 8 January 2009

Usage

This is a link template that uses DPL to provide a link for the specified Heroes-related title with subtitle, if any. By default, appends subtitle after a colon and space as is standard for NBC and other style guidelines; but an option is available to use a semicolon instead of a colon. The list of titles used in this template are listed in {{ep}}. Options are also available to use the namespace format like {{epn}} or parentheses format like {{epp}}. Note: this function uses 2 DPL calls to get the data. The parsing is done using the subtemplate {{eps/subtitle}}.

Syntax

{{eps
|<!--identifier listed in {{ep}}-->
|<!--optional format specification; default is {{ep}} format-->
|semi=<!--set true for semi-colon instead of the default colon-->
}}

Examples

Due to DPL restrictions on recursion, examples cannot be provided in the same article as the template itself so are provided on the related talk page instead.