Difference between revisions of "Template:~Link"

From Maths
Jump to: navigation, search
m (Removed "sample" data)
m (Alec moved page Template:Link to Template:~Link: For update documented on the page)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>[[<!--
 
<includeonly>[[<!--
 
NAMESPACE:
 
NAMESPACE:
-->{{#if:{{{ns|{{{3|}}}}}}|{{{ns|{{{3|}}}}}}:|}}<!--
+
-->{{#if:{{{wiki|{{{w|}}}}}}|{{{wiki|{{{w|}}}}}}:|}}<!--
 +
-->{{#if:{{{ns|}}}|{{{ns|}}}:|}}<!--
  
 
-->{{#if:{{{2|{{{type|}}}}}}<!--
 
-->{{#if:{{{2|{{{type|}}}}}}<!--
     -->|{{{1|}}} ({{{2|{{{type|}}}}}})<!--
+
     -->|{{{1|}}}{{#if:{{{4|}}}|{{{3|}}}|}} ({{{2|{{{type|}}}}}})<!--
     -->|Why are you using this template?<!--
+
     -->|{{{1|}}}{{#if:{{{4|}}}|{{{3|}}}|}}<!--
 
-->}}<!--
 
-->}}<!--
  
  
-->|{{{1|No name supplied!}}}]]</includeonly><noinclude>
+
-->|{{#if:{{{replace1|}}}|{{{replace1|}}}|<!--no replace1 given-->{{{1|No name supplied!}}}<!--close if-->}}<!--end of main name-->{{#if:{{{4|}}}|{{{4|}}}|{{{3|}}}}}]]</includeonly><noinclude>
  
Use: {{C|<nowiki>{{link|homomorphism|group|optionalns}}</nowiki>}} to get a link {{C|homomorphism}} to the {{C|optionalns:homomorphism (group)}} page.
+
Use: {{C|<nowiki>{{link|homomorphism|group|ns=optionalns}}</nowiki>}} to get a link {{C|homomorphism}} to the {{C|optionalns:homomorphism (group)}} page.
 +
* As of 10<sup>th</sup> of September 2016, you can now use the [[Template:Plural]] syntax, eg:
 +
** {{C|<nowiki>{{link|variable symbol|FOL|s}}</nowiki>}} for a link as usual, but displayed as {{C|variable symbols}} and
 +
** {{C|<nowiki>{{link|pupp|example|y|ies}}</nowiki>}} for a link to the {{C|puppy (example)}} page, rendered as {{C|puppies}}.
 +
* As of 7<sup>th</sup> of September 2017 you can use interwiki links, using the w or wiki parameter
 +
* As of 31<sup>st</sup> of December 2017 (@1916) you can now use {{C|1=replace1=X}} so {{C|<nowiki>{{link|X|replace1=Z|...}}</nowiki>}} renders as {{C|<nowiki>[[X...|Z...]]</nowiki>}}
 +
** '''UPDATE PLAN:''' (required as it's used in 225 pages at time of writing)
 +
**# Test that a template page being a redirect will forward parameters first
 +
**#* This way we can leave a redirect behind for the move in step 2, thus not breaking everything
 +
**# Move Template:Link to template {{strike|_Link}} - {{C|~Link}}
 +
**# Re-write template:Link to forward parameters initially
 +
**# TEST IT WORKS THUS FAR
 +
**# ALTER template:link to forward with replace1 set with a list index of sorts, using [[Template data:Link substitutions]]'s [[Template data:Link substitutions/List|/List]]
 +
** '''STATUS:'''
 +
*** NOT YET DONE [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 19:25, 31 December 2017 (UTC)
 +
*** Redirect test done (see: [[User:Alec/Template redirect test]]) [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 19:32, 31 December 2017 (UTC)
 +
*** Moving to [[Template:~Link]] - will leave redirect behind. [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 19:37, 31 December 2017 (UTC)
 
</noinclude>
 
</noinclude>

Latest revision as of 19:38, 31 December 2017


Use: {{link|homomorphism|group|ns=optionalns}} to get a link homomorphism to the optionalns:homomorphism (group) page.

  • As of 10th of September 2016, you can now use the Template:Plural syntax, eg:
    • {{link|variable symbol|FOL|s}} for a link as usual, but displayed as variable symbols and
    • {{link|pupp|example|y|ies}} for a link to the puppy (example) page, rendered as puppies.
  • As of 7th of September 2017 you can use interwiki links, using the w or wiki parameter
  • As of 31st of December 2017 (@1916) you can now use replace1=X so {{link|X|replace1=Z|...}} renders as [[X...|Z...]]
    • UPDATE PLAN: (required as it's used in 225 pages at time of writing)
      1. Test that a template page being a redirect will forward parameters first
        • This way we can leave a redirect behind for the move in step 2, thus not breaking everything
      2. Move Template:Link to template _Link - ~Link
      3. Re-write template:Link to forward parameters initially
      4. TEST IT WORKS THUS FAR
      5. ALTER template:link to forward with replace1 set with a list index of sorts, using Template data:Link substitutions's /List
    • STATUS: