Template:Refn
A footnote that can contain its own citations. A plain <ref> can't hold another <ref>; this wraps {{#tag:ref|…}} so you don't have to.
Some claim.{{refn|An aside that cites a source.<ref name="source" />}}
1— the note text. If it contains a bare=(a URL with a query string, say), write1=explicitly:{{refn|1=…}}.name— optional, to reuse the note elsewhere with<ref name="…" />.
Notes go in the same default-group <references/> list as citations, so the Ecru skin lifts them into the margin as sidenotes.