Template:WildStar/id: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 47: Line 47:
-->{{#vardefine:tLT2|{{#switch:{{#var:t1}}|API|API TYPE={{#var:tDEL}}|API EVENT=|CVAR={{{2}}}{{#var:tDEL}}|#default={{#var:tDEL}}{{{2|}}}}}}}<!--
-->{{#vardefine:tLT2|{{#switch:{{#var:t1}}|API|API TYPE={{#var:tDEL}}|API EVENT=|CVAR={{{2}}}{{#var:tDEL}}|#default={{#var:tDEL}}{{{2|}}}}}}}<!--


-->{{#if:{{{4|}}}|<span id="{{{2}}}{{#var:tDEL}}{{{3}}}{{#var:tDEL}}{{{4}}}">[[{{#var:sub}}/{{#var:t1}} {{{2}}} {{{3}}} {{{4}}}|{{#var:tLT2}}{{{3}}}{{#var:tDEL}}{{{4}}}]]</span>|<!--
-->{{#if:{{{4|}}}|<span id="{{{2}}}{{#var:tDEL}}{{{3}}}{{#var:tDEL}}{{{4}}}">[[{{#var:sub}}:{{#var:t1}} {{{2}}} {{{3}}} {{{4}}}|{{#var:tLT2}}{{{3}}}{{#var:tDEL}}{{{4}}}]]</span>|<!--
-->{{#if:{{{3|}}}|<span id="{{{2}}}{{#var:tDEL}}{{{3}}}">[[{{#var:sub}}/{{#var:t1}} {{{2}}} {{{3}}}|{{#var:tLT2}}{{{3}}}]]</span>|<!--
-->{{#if:{{{3|}}}|<span id="{{{2}}}{{#var:tDEL}}{{{3}}}">[[{{#var:sub}}:{{#var:t1}} {{{2}}} {{{3}}}|{{#var:tLT2}}{{{3}}}]]</span>|<!--
-->{{#if:{{{2|}}}|<span id="{{{2}}}">[[{{#var:sub}}/{{#var:t1}} {{{2}}}|{{{2}}}]]</span>|<!--
-->{{#if:{{{2|}}}|<span id="{{{2}}}">[[{{#var:sub}}:{{#var:t1}} {{{2}}}|{{{2}}}]]</span>|<!--
-->{{#if:{{{1|}}}|<span id="{{{1}}}">[[{{#var:sub}}/{{{1}}}]]</span>|}}}}}}}}<!--
-->{{#if:{{{1|}}}|<span id="{{{1}}}">[[{{#var:sub}}:{{{1}}}]]</span>|}}}}}}}}<!--


--></includeonly></onlyinclude>
--></includeonly></onlyinclude>

Revision as of 03:55, 9 August 2023

Adds a link with an html id= to a wiki page, that is referable via link with an # (anchor). Optionally create complex links and ids for technical pages. See {{WildStar/api}} or Category:Link helper templates for helper templates for regular links.

Usage
1= [text] - name for page link, text, and id. Not used in text or id, if parts 2, 3 or 4 are used
2= [text] (Optional) - second part
3= [text] (Optional) - third part
4= [text] (Optional) - fourth part
t= [member,method] (Optional) - delimiter for text and id. Only between parts 2, 3, 4. Default is member
Example

Link accessible via #AMP:Detonate (click and page will move there)

{{\|id|AMP:Detonate}}

WildStar:AMP:Detonate

Options
1= Special link part names:
  • API - A UI API api page link. Defaults to t=member (.). Omits |2= in link text if 3 or 4 parts
  • API TYPE - A API types page link. Defaults to t=method (:). Omits |2= in link text if 3 or 4 parts
  • API EVENT - A API events page link. Defaults to t=member (.). Omits del |2= in link text if 3 or 4 parts
  • CVAR - A CVars page link. Defaults to t=member (.).
  • APIT - short-hand for API TYPE. Otherwise works the same and produces same links.
  • APIE - short-hand for API EVENT. Otherwise works the same and produces same links.
Results samples
{{id|Apollo}} - link: Apollo, id: Apollo, text: Apollo
{{id|Apollo Bob}} - link: Apollo Bob, id: Apollo Bob, text: Apollo Bob
{{id|CVAR|assistAttack}} - link: CVAR assistAttack, id: assistAttack, text: assistAttack
{{id|CVAR|ui|setting}} - link: CVAR ui.setting, id: ui.setting, text: ui.setting
{{id|API|Apollo|SetAlpha}} - link: API Apollo SetAlpha, id: Apollo.SetAlpha, text: Apollo.SetAlpha
{{id|API|Apollo|SetAlpha|t=method}} - link: API Apollo SetAlpha, id: Apollo:SetAlpha, text: Apollo:SetAlpha
video.fullscreen(bFullscreen)
UI_HealthChanged(newValue,maxCharacterHealth)
bagId(newValue,maxCharacterHealth)

Template