Template:Cite IETF
|_exclude= appendix, autolink, bcp, draft, fyi, idanchor, idlink, idlinktype, ien, nosec, page-url, referenceid, rfc, rtr, sections, sectionname, separator, seperator, std, _debug, nopp
|_reuse=at, id, ID, doi, DOI, page, pages, ref, section, section-url, title, url
|mode={{#invoke:Citation mode|main|cs1}}
|title = {{
#if:{{{title|}}}
|{{{title}}}
|{{
#if:{{{sectionname|}}}
||{{
#if:{{{rfc|}}}{{{std|}}}{{{bcp|}}}{{{fyi|}}}{{{draft|}}}{{{ien|}}}{{{rtr|}}}{{{id|}}}{{{ID|}}}
|{{Cite IETF/doctypes
|Id = {{
#if:{{{id|}}}{{{ID|}}}
|{{{id|{{{ID|}}}}}}
|{{Cite IETF/refanchor
|Sep = {{
#if:{{#ifeq:{{yesno|{{{autolink|}}}|blank=yes}}|yes|x}}{{{url|}}}{{{idlink|}}}{{{idanchor|}}}
||{{#tag:nowiki}}
}}
|Rfc = {{{rfc|}}}
|Std = {{{std|}}}
|Bcp = {{{bcp|}}}
|Fyi = {{{fyi|}}}
|Draft = {{{draft|}}}
|Ien = {{{ien|}}}
|Rtr = {{{rtr|}}}
}}
}}
|Idlink = {{
#if:{{{url|}}}
||{{
#if:{{{idlink|}}}
|{{{idlink}}}
|{{
#if:{{{idanchor|}}}
|#{{anchorencode:{{
#ifeq:{{lc:{{{idanchor}}}}}|ietf
|{{Cite IETF/refanchor
|Prefix = IETF
|Id = {{{id|{{{ID|}}}}}}
|Rfc = {{{rfc|}}}
|Std = {{{std|}}}
|Bcp = {{{bcp|}}}
|Fyi = {{{fyi|}}}
|Draft = {{{draft|}}}
|Ien = {{{ien|}}}
|Rtr = {{{rtr|}}}
}}
|{{{idanchor}}}
}}}}
}}
}}
}}
}}
}}
}}
}}
|url = {{
#if:{{{title|}}}{{#if:{{{idlink|}}}{{{idanchor|}}}||{{{rfc|}}}{{{std|}}}{{{bcp|}}}{{{fyi|}}}{{{draft|}}}{{{ien|}}}{{{rtr|}}}}}
|{{Cite IETF/makelink
|Url = {{{url|}}}
|Anchor = {{
#if:{{{sectionname|}}}
||{{
#if:{{{section|}}}{{{appendix|}}}{{{referenceid|}}}{{{page|}}}
|#{{
#if:{{{section|}}}
|section-{{{section}}}
|{{
#if:{{{appendix|}}}
|appendix-{{{appendix}}}
|{{
#if:{{{referenceid|}}}
|ref-{{{referenceid}}}
|{{
#if:{{{page|}}}
|page-{{{page}}}
}}
}}
}}
}}
}}
}}
|Autolink = {{{autolink|}}}
|Rfc = {{{rfc|}}}
|Std = {{{std|}}}
|Bcp = {{{bcp|}}}
|Fyi = {{{fyi|}}}
|Draft = {{{draft|}}}
|Ien = {{{ien|}}}
|Rtr = {{{rtr|}}}
}}
}}
|at = {{
#if:{{{pages|}}}
|{{#if:{{{nopp|}}}||pp. }}{{{pages}}}
|{{
#if:{{{page|}}}
|{{#if:{{{nopp|}}}||p. }}{{{page}}}
}}
}}{{
#if:{{{section|}}}{{{appendix|}}}
|{{
#if:{{{pages|}}}{{{page|}}}
|{{#ifeq:{{{separator|{{{seperator}}}}}}|;|;|{{{separator|{{{seperator|.}}}}}}}}
}}{{#if:{{{nosec|}}}||sec. }}{{{sections|{{{section|{{{appendix}}}}}}}}}
}}
|section = {{{sectionname|}}}
|section-url = {{
#if:{{{sectionname|}}}
|{{
#if:{{{section-url|}}}{{{page-url|}}}
|{{{section-url|{{{page-url}}}}}}
|{{
#if:{{{section|}}}{{{appendix|}}}{{{referenceid|}}}{{{page|}}}
|{{Cite IETF/makelink
|Url = {{{url|}}}
|Anchor = #{{
#if:{{{section|}}}
|section-{{{section}}}
|{{
#if:{{{appendix|}}}
|appendix-{{{appendix}}}
|{{
#if:{{{referenceid|}}}
|ref-{{{referenceid}}}
|{{
#if:{{{page|}}}
|page-{{{page}}}
}}
}}
}}
}}
|Autolink = {{{autolink|}}}
|Rfc = {{{rfc|}}}
|Std = {{{std|}}}
|Bcp = {{{bcp|}}}
|Fyi = {{{fyi|}}}
|Draft = {{{draft|}}}
|Ien = {{{ien|}}}
|Rtr = {{{rtr|}}}
}}
}}
}}
}}
|id = {{
#if:{{{title|}}}{{{sectionname|}}}
|{{Cite IETF/doctypes
|Id = {{{id|{{{ID|}}}}}}
|Sep = {{#ifeq:{{{separator|{{{seperator}}}}}}|;|;|{{{separator|{{{seperator|.}}}}}}}}
|Std = {{{std|}}}
|Bcp = {{{bcp|}}}
|Fyi = {{{fyi|}}}
|Rfc = {{{rfc|}}}
|Draft = {{{draft|}}}
|Ien = {{{ien|}}}
|Rtr = {{{rtr|}}}
|Idlink = {{
#if:{{{idlink|}}}
|{{{idlink}}}
|{{
#if:{{{idanchor|}}}
|#{{anchorencode:{{
#ifeq:{{lc:{{{idanchor}}}}}|ietf
|{{Cite IETF/refanchor
|Prefix = IETF
|Id = {{{id|{{{ID|}}}}}}
|Rfc = {{{rfc|}}}
|Std = {{{std|}}}
|Bcp = {{{bcp|}}}
|Fyi = {{{fyi|}}}
|Draft = {{{draft|}}}
|Ien = {{{ien|}}}
|Rtr = {{{rtr|}}}
}}
|{{{idanchor}}}
}}}}
}}
}}
|Idlinktype = {{
#if:{{{idlinktype|}}}
|{{{idlinktype}}}
|{{
#if:{{{id|}}}{{{ID|}}}
||{{
#if:{{{idlink|}}}{{{idanchor|}}}
|{{
#if:{{{rfc|}}}
|rfc
|{{
#if:{{{std|}}}
|std
|{{
#if:{{{bcp|}}}
|bcp
|{{
#if:{{{fyi|}}}
|fyi
|{{
#if:{{{draft|}}}
|draft
|{{
#if:{{{ien|}}}
|ien
|{{
#if:{{{rtr|}}}
|rtr
}}
}}
}}
}}
}}
}}
}}
}}
}}
}}
}}
}}
|doi-access={{{doi-access|{{#if:{{{rfc|}}}|free}}}}}
|doi = {{{doi|{{{DOI|{{#if:{{{rfc|}}}|10.17487/RFC{{padleft:{{{rfc}}}|4}}}}}}}}}}
|ref = {{
#ifeq:{{lc:{{{ref|}}}}}|ietf
|{{Cite IETF/refanchor
|Prefix = IETF
|Id = {{{id|{{{ID|}}}}}}
|Rfc = {{{rfc|}}}
|Std = {{{std|}}}
|Bcp = {{{bcp|}}}
|Fyi = {{{fyi|}}}
|Draft = {{{draft|}}}
|Ien = {{{ien|}}}
|Rtr = {{{rtr|}}}
}}
|{{{ref|}}}
}}
}}{{
#if:{{{section-url|}}}{{{page-url|}}}
|{{
#if:{{{sectionname|}}}
||{{Citation error|you must specify {{para|sectionname}} when you use {{para|{{#if:{{{section-url|}}}|section-url|page-url}}}}|cite IETF}}
}}
}}{{
#if:{{{idlink|}}}{{{idanchor|}}}
|{{
#if:{{{rfc|}}}{{{std|}}}{{{bcp|}}}{{{fyi|}}}{{{draft|}}}{{{ien|}}}{{{rtr|}}}{{{id|}}}{{{ID|}}}
||{{Citation error|you must specify one of {{para|rfc}}, {{para|std}}, {{para|bcp}}, {{para|fyi}}, {{para|draft}}, {{para|ien}}, {{para|rtr}}, or {{para|id}} when you use {{para|{{#if:{{{idlink|}}}|idlink|idanchor}}}}|cite IETF}}
}}
}}{{
#if:{{{idlinktype|}}}
|{{
#if:{{{idlink|}}}{{{idanchor|}}}
||{{Citation error|you must specify {{para|idanchor}} or {{para|idlink}} when you use {{para|idlinktype}}|cite IETF}}
}}{{
#switch:{{lc:{{{idlinktype}}}}}
|rfc |std |bcp |fyi |draft |ien |rtr |id =
|#default = {{Citation error|unknown value: {{{idlinktype}}}
passed to {{para|idlinktype}}, must be one of: rfc, std, bcp, fyi, draft, ien, rtr
|cite IETF}}
}}
}}