Template:Ref

{{#if: {{{archiveurl|}}} | {{#if: {{{archiveurl|}}} | {{#if: {{{title|}}} | {{{title}}} ([{{{archiveurl}}} archived]) }}}} | {{#if: {{{url|}}} | {{#if: {{{title|}}} | [{{{url}}} {{{title}}}{{#if:{{{timestamp|}}}|&#32;({{{timestamp}}})]. }}}} }}{{#if: {{{work|}}} | &#32; {{{work}}} }}{{#if: {{{author|}}} ||{{#if: {{{date|}}} | &#32;({{{date}}}) }} }}.{{#if:{{{timestamp|}}}| &#32;{{#if:{{{archiveurl|}}}|Archived at [{{{doclink}}} {{{timestamp}}}].| }}{{#if: {{{provider|}}}|(provided by {{{provider}}}).&#32;| }}{{#if: {{{archivedate|}}} | &#32;Archived from [{{{archiveurl}}} the original] on {{{archivedate}}}. }}{{#if: {{{accessdate|}}} | &#32;Retrieved on {{{accessdate}}}. }}

Usage
To use this template, enter the following and fill in the appropriate fields. Any field left blank will not show up. Don't forget to include brackets, to make the fields into links.