Jump to content

Do not begin to migrate content here, it may be wiped without notice. More info.

Template:MoinMarkup/Embed: Difference between revisions

From Debian Wiki
Created page with "<pre><onlyinclude>{{switch:{{{Type|}}} | attachment = {{{Output|}}} <!-- TODO: support embedding attachments (images, text etc.) - see discussion near the bottom of Template:Embed --> | external = <nowiki></nowiki>{{{URL|}}}<nowiki></nowiki> | Category:Pages with unknown embeds{{{Output|}}} <!-- TODO: fix embed {{{Type|}}} - should be "attachment" or "external" --> }}{{Template:MoinMarkup/Boilerplate}}</onlyinclude></pre> <templatedata> { "description": "Embed..."
 
No edit summary
 
Line 1: Line 1:
<pre><onlyinclude>{{switch:{{{Type|}}}
<pre><onlyinclude>{{#switch:{{{Type|}}}
| attachment = {{{Output|}}} <!-- TODO: support embedding attachments (images, text etc.) - see discussion near the bottom of Template:Embed -->
| attachment = {{#switch:{{{Extension|}}}
  | png
  | jpg
  | jpeg
  | gif
  | svg
  | avif = <!-- TODO: support embedding attached images - see discussion near the bottom of Template:Embed -->
  | pdf = <!-- TODO: support embedding attached PDFs - see discussion near the bottom of Template:Embed -->
  | txt
  | sh
  | log
  | c
  | ics
  | diff = <!-- TODO: support embedding attached text - see discussion near the bottom of Template:Embed -->
  | <!-- TODO: support embedding attached binary files - see discussion near the bottom of Template:Embed -->
  }}
| external  = <nowiki></nowiki>{{{URL|}}}<nowiki></nowiki>
| external  = <nowiki></nowiki>{{{URL|}}}<nowiki></nowiki>
| [[Category:Pages with unknown embeds]]{{{Output|}}} <!-- TODO: fix embed {{{Type|}}} - should be "attachment" or "external" -->
| [[Category:Pages with unknown embeds]]{{{Output|}}} <!-- TODO: fix embed {{{Type|}}} - should be "attachment" or "external" -->
Line 32: Line 47:
             "required": true,
             "required": true,
             "description": "URL of the embedded content.",
             "description": "URL of the embedded content.",
            "deprecated": true
        },
        "Extension": {
            "type": "line",
            "required": true,
            "description": "Lowercase filename extension from URL.",
             "deprecated": true
             "deprecated": true
         },
         },

Latest revision as of 19:30, 21 March 2026

<onlyinclude>{{#switch:{{{Type|}}}
| attachment = {{#switch:{{{Extension|}}}
  | png
  | jpg
  | jpeg
  | gif
  | svg
  | avif = <!-- TODO: support embedding attached images - see discussion near the bottom of Template:Embed -->
  | pdf = <!-- TODO: support embedding attached PDFs - see discussion near the bottom of Template:Embed -->
  | txt
  | sh
  | log
  | c
  | ics
  | diff = <!-- TODO: support embedding attached text - see discussion near the bottom of Template:Embed -->
  | <!-- TODO: support embedding attached binary files - see discussion near the bottom of Template:Embed -->
  }}
| external   = {{{URL|}}}
| [[Category:Pages with unknown embeds]]{{{Output|}}} <!-- TODO: fix embed {{{Type|}}} - should be "attachment" or "external" -->
}}{{Template:MoinMarkup/Boilerplate}}</onlyinclude>

Embedded content from a MoinMoin page

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
MoinMarkupIDMoinMarkupID

Unique ID for this template on the page, must be the first parameter.

Numberdeprecated
ContentContent

Text between {{ and }} in the MoinMoin source.

Linedeprecated
TypeType

Whether the embedded content is an attachment on the current wiki or external content.

Suggested values
attachment external
Linedeprecated
URLURL

URL of the embedded content.

URLdeprecated
ExtensionExtension

Lowercase filename extension from URL.

Linedeprecated
AltAlt

Alt text.

Linedeprecated
ArgsArgs

Comma-separated list of named arguments.

Unknowndeprecated
ArgAlignArgAlign

Show embedded content aligned to the specified position

Suggested values
top middle bottom right left
Linedeprecated
ArgWidthArgWidth

Width of the attached image, in pixels

Numberdeprecated
ArgHeightArgHeight

Height of the attached image, in pixels

Numberdeprecated
OutputOutput

wikitext resembling MoinMoin's rendered output

Contentdeprecated
MoinMarkupID2MoinMarkupID2

Same value as MoinMarkupID=, guaranteed to be the last parameter

Numberdeprecated

Please do not create new instances of this template.

When this wiki was converted from MoinMoin, we used MoinMarkup templates to represent anything that didn't translate neatly between the two formats. The goal is to gradually replace these with native MediaWiki equivalents.

The program that converted the old MoinMoin source always passes a unique MoinMarkupID= value as the first parameter, and the same value in MoinMarkupID2= as the last parameter. If you want to mass-edit every instance of this template (e.g. with the Replace Text extension), you should be able to search for something like {{MoinMarkup/Embed|MoinMarkupID=(\d+)(.*)|MoinMarkupID2=\1}}.

Some notes about this template: