VOOZH about

URL: https://en.wikipedia.org/wiki/Template:Cite_IETF/makelink

⇱ Template:Cite IETF/makelink - Wikipedia


Jump to content
From Wikipedia, the free encyclopedia
👁 Image
Template documentation
[view] [edit] [history] [purge]

This template is a "subroutine" of {{Cite IETF}} used for conditionally creating links for different types of documents.

This "subroutine" is designed for {{Cite IETF}} and makes assumptions that may not be valid elsewhere.

Background

It uses the following algorithm:

  1. If the |Url= parameter is given the template will simply display that value along with an optional anchor generated from |Anchor= appended.
  2. If the |Url= parameter is not given and the |Autolink= parameter evaluates to anything other than no, then the template attempts to generate a URL:
    • In the order of |Rfc=, |Std=, |Bcp=, |Fyi=, |Draft=, |Ien=, or |Rtr=, the template looks for the first nonempty parameter and create a link with it.
      • In the case of |Rfc=, if |Style= is set to "html" or empty, it uses the new-style rfc-editor.org website. This new website provides a true HTML rendering with proportional text for the newer RFC pages and provides a simple "htmlized" view for the older pages with monospace font. Otherwise it uses the datatracker.ietf.org website, which always provides an "htmlized" view but offers a helpful sidebar.
      • In the case of |Draft=, if |Style= is set to "text" or empty, it uses the old-style datatracker.ietf.org rendering. Otherwise it uses the new-style www.ietf.org/archive website, which offers a true HTML rendering for the newer pages but returns 404 Not Found for the older pages.
    • If the |Anchor= parameter is given, it will be appended to the generated url.
  3. If the |Anchor= parameter is given but no Url is provided or auto-generated, a {{preview warning}} is produced. It may still end up invisible when passed to the bowels of {{Cite IETF}}.

Use

It is invoked as:

| = <value of |url= or |archiveurl= parameters>
| = <section or page anchor generated from the value of the |section= or |page= parameters>
| = <value of |autolink= parameter>
| = <value of |rfc= parameter>
| = <value of |std= parameter>
| = <value of |bcp= parameter>
| = <value of |fyi= parameter>
| = <value of |draft= parameter>
| = <value of |ien= parameter>
| = <value of |rtr= parameter>

Examples

{{Cite IETF/makelink |Fyi=17 |Anchor=&#035;page-5}}
produces "https://datatracker.ietf.org/doc/html/fyi17#page-5" (sandbox currently gives: https://datatracker.ietf.org/doc/html/fyi17#page-5).
{{Cite IETF/makelink |Url=https://datatracker.ietf.org/doc/html/rfc2119 |Anchor=&#035;section-1}}
produces "https://datatracker.ietf.org/doc/html/rfc2119#section-1" (sandbox currently gives: https://datatracker.ietf.org/doc/html/rfc2119#section-1).
{{Cite IETF/makelink |Rfc=1122 |Std=3}}
produces "https://www.rfc-editor.org/rfc/rfc1122" (sandbox says: https://www.rfc-editor.org/rfc/rfc1122).
{{Cite IETF/makelink |Rfc=822 |Std=11 |Anchor=&#035;section-4}}
produces "https://www.rfc-editor.org/rfc/rfc822#section-4" (sandbox says: https://www.rfc-editor.org/rfc/rfc822#section-4).
{{Cite IETF/makelink |Rfc=854 |Std=8}}
produces "https://www.rfc-editor.org/rfc/rfc854" (sandbox says: https://www.rfc-editor.org/rfc/rfc854
{{Cite IETF/makelink |Anchor=&#035;section-4}}
produces "" (sandbox says:
{{Cite IETF/makelink |Autolink=no |Anchor=&#035;section-4}}
produces "" (sandbox says: