Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a22f6f1c7817d685

Jump to content

Template:File/doc

From Wikipedia, the free encyclopedia

This template is a quick way to sanitize filename strings, which ensures they are always formatted as File: and will work with embedding syntax.

For example, say a template takes an image parameter. Should it be Dog.jpg or File:Dog.jpg? You could make everyone read the documentation, or you could clutter up your own template with extra code, or you could use this.

Cheap and easy (it only uses a single PAGENAME magic word call).

{{file|File:Dog.jpg}} File:Dog.jpg
{{file|Dog.jpg}} File:Dog.jpg
{{file|Image:Dog.jpg}} File:Dog.jpg
{{file|File:The Dog File: Woofs Of The Dog Still.jpg}} File:The Dog File: Woofs Of The Dog Still.jpg
{{file|Image:The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}} File:The Dog File: Picture This Image: Woofs Of The Dog Still.jpg
{{file|The Dog File: Picture This Image: Woofs Of The Dog Still.jpg}} File:The Dog File: Picture This Image: Woofs Of The Dog Still.jpg

Bizarre edge-cases where a file's name itself starts with "File:" are not going to work properly (I don't even know if it's possible to upload these, but if you do, then don't).

{{file|File:File:File:How To Remove Metal From A File: The Hard Way.pdf}} File:File:File:How To Remove Metal From A File: The Hard Way.pdf