Topic on Extension talk:TemplateData

inserting images/files in templates in the new wikipedia editor

4
Elastano (talkcontribs)

is shit. the software should recognize when file names have to be wrapped inside some wiki markup in order to be shown correctly. for example, if i try to insert the filename of a screenshot into a page that is using an infobox with a "screenshot=" field, it should at least alert me that this field expects something like File:Xy.png and maybe offer text completion instead of just saving the wrong string that just shows text after saving.

Tacsipacsi (talkcontribs)

This is neither the responsibility of TemplateData nor of the visual editor. These are just tools for storing and presenting template documentation; the on-wiki template documentation should make it clear what format the parameters should use (and stop using “file” data type if it does now, as that‘s clearly for bare-filename parameters).

Elastano (talkcontribs)

interesting. so you think it can be made to show all the wished behaviour i described above with just the right code in the template documentation?

Tacsipacsi (talkcontribs)

Of course it’s possible to say in the human-readable description field something like “The screenshot using the normal ‘[[File:filename.jpg|250px]]’ image embed syntax.” It’s not possible, however, to convert just the file name automatically into a file link, as that contains arbitrary options in addition to the file name, like the desired width. (By the way, if you save the page without checking the preview, that’s your problem.)

Reply to "inserting images/files in templates in the new wikipedia editor"