Template:LinkEppstein: Difference between revisions
Jump to navigation
Jump to search
Apple Bottom (talk | contribs) mNo edit summary |
Apple Bottom (talk | contribs) Support linking to arbitary pages on David Eppstein's site, using page= ; also document and provide an example. |
||
| Line 1: | Line 1: | ||
<includeonly>{{#ifeq: {{{style|listitem}}} | listitem |* [http://fano.ics.uci.edu/ca/gliders/g{{{number|{{{1}}}}}}.html {{{patternname|Glider {{{number|{{{1}}}}}}}}} ] at David Eppstein's Glider Database | {{#ifeq: {{{style|raw}}} | raw | [http://fano.ics.uci.edu/ca/gliders/g{{{number|{{{1}}}}}}.html {{{patternname|{{{number|{{{1}}}}}}}}} ] }} }} [[Category:Pages that link to David Eppstein's Glider Database]]</includeonly><noinclude>This is a template for including links to '''[http://fano.ics.uci.edu/ca/ David Eppstein's Glider Database]''' in the "External Links" section of an article. It can take three parameters: | <includeonly>{{#ifeq: {{{style|listitem}}} | listitem |* [http://fano.ics.uci.edu/ca/{{{page|gliders/g{{{number|{{{1}}}}}}.html}}} {{#if: {{{page|}}} | {{{name|{{{patternname|{{{page}}}}}}}}} | {{{name|{{{patternname|Glider {{{number|{{{1}}}}}}}}}}}} }} ] at David Eppstein's Glider Database | {{#ifeq: {{{style|raw}}} | raw | [http://fano.ics.uci.edu/ca/{{{page|gliders/g{{{number|{{{1}}}}}}.html}}} {{#if: {{{page|}}} | {{{name|{{{patternname|{{{page}}}}}}}}} | {{{name|{{{patternname|{{{number|{{{1}}}}}}}}}}}} }} ] }} }} [[Category:Pages that link to David Eppstein's Glider Database]]</includeonly><noinclude>This is a template for including links to '''[http://fano.ics.uci.edu/ca/ David Eppstein's Glider Database]''' in the "External Links" section of an article. It can take three parameters: | ||
* ''number'' (mandatory), which specifies the number of the glider (i.e. spaceship) that will be linked to on the Glider Database; | * ''number'' (mandatory), which specifies the number of the glider (i.e. spaceship) that will be linked to on the Glider Database; | ||
* ''patternname'' | * ''name'' (or ''patternname''; optional), which specifies the name of the pattern as it will appear in the link text (default: "Glider" followed by the number provided); | ||
* ''style'' (optional), which specifies how to format the link (style=listitem or style=raw; default: listitem) | * ''style'' (optional), which specifies how to format the link (style=listitem or style=raw; default: listitem) | ||
Here | To link to a different page on David Eppstein's Glider Database instead, one not describing a specific spaceship, the following parameters can be used: | ||
* ''page'' (mandatory), which specifies the path and filename (including the <tt>.html</tt>) suffix of the page being linked to, relative to <tt>http://fano.ics.uci.edu/ca/</tt> ; | |||
* ''name'' (or ''patternname''; optional), which specifies the name of the page as it will appear in the link text (default: same as ''page''); | |||
* ''style'' (optional), which specifies how to format the link (style=listitem or style=raw; default: listitem) | |||
Here are some simple examples of its usage: | |||
'''You type:''' | '''You type:''' | ||
| Line 13: | Line 19: | ||
'''You see:''' | '''You see:''' | ||
*[http://fano.ics.uci.edu/ca/gliders/g115.html The Glider (glider 115)] at David Eppstein's Glider Database | *[http://fano.ics.uci.edu/ca/gliders/g115.html The Glider (glider 115)] at David Eppstein's Glider Database | ||
'''You type:''' | |||
<tt><nowiki>{{LinkEppstein|page=gliders/knightships.html|name=The off-slope gliders}}</nowiki></tt> | |||
'''You see:''' | |||
*[http://fano.ics.uci.edu/ca/gliders/knightships.html The off-slope gliders] at David Eppstein's Glider Database | |||
==See also== | ==See also== | ||
Revision as of 16:52, 23 August 2017
This is a template for including links to David Eppstein's Glider Database in the "External Links" section of an article. It can take three parameters:
- number (mandatory), which specifies the number of the glider (i.e. spaceship) that will be linked to on the Glider Database;
- name (or patternname; optional), which specifies the name of the pattern as it will appear in the link text (default: "Glider" followed by the number provided);
- style (optional), which specifies how to format the link (style=listitem or style=raw; default: listitem)
To link to a different page on David Eppstein's Glider Database instead, one not describing a specific spaceship, the following parameters can be used:
- page (mandatory), which specifies the path and filename (including the .html) suffix of the page being linked to, relative to http://fano.ics.uci.edu/ca/ ;
- name (or patternname; optional), which specifies the name of the page as it will appear in the link text (default: same as page);
- style (optional), which specifies how to format the link (style=listitem or style=raw; default: listitem)
Here are some simple examples of its usage:
You type:
{{LinkEppstein|number=115|patternname=The Glider (glider 115)}}
You see:
- The Glider (glider 115) at David Eppstein's Glider Database
You type:
{{LinkEppstein|page=gliders/knightships.html|name=The off-slope gliders}}
You see:
- The off-slope gliders at David Eppstein's Glider Database
See also
- Pages that link to external sites (category)
External link templates
- Template:Cata
- Template:LinkCallahan
- Template:LinkCatagolue
- Template:LinkCatagolueRule
- Template:LinkEppstein
- Template:LinkEppsteinRule
- Template:LinkForumThread
- Template:LinkGoLDictionary
- Template:LinkGoLNews
- Template:LinkGollyHelp
- Template:LinkLexicon
- Template:LinkMathworld
- Template:LinkMirek
- Template:LinkNiemiec
- Template:LinkPentadecathlonObject
- Template:LinkWikipedia
- Template:LinkYouTube
- Template:MathGenealogy
- Template:OEIS