Template talk:License

Latest comment: 4 years ago by Samwilson in topic Why have element IDs?

Documentation edit

Usage edit

This template should be used in all license metatemplates. It should not be used directly on a page.

{{license
 |image=
 |text=
}} <noinclude>[[Category:License templates|{{subst:PAGENAME}}]]</noinclude>

Example edit

{{license
 |image=PD-icon.svg
 |text=This work is in the '''[[w:public domain|public domain]]''' worldwide because it has been so released by the [[Wikisource:copyright|copyright]] holder.
}} <noinclude>[[Category:License templates|{{subst:PAGENAME}}]]</noinclude>

 

This work is in the public domain worldwide because it has been so released by the copyright holder.

Public domainPublic domainfalsefalse

Frivolous Formatting edit

Please delete the margin-top: 1em;. The extra white space confuses readers and is unnecessary.24.65.69.8 01:41, 30 September 2008 (UTC)Reply

Why have element IDs? edit

This template currently produces a span like one of these:

-->{{#if:{{{image_r|}}}<!--
	-->|<span id="imageRight">[[File:{{{image_r}}}|x48px|alt=|link=]]</span><!--
	-->|<span id="noimageRight">&nbsp;</span><!--
-->}}<!--

What is the purpose of the id attribute here? It doesn't seem to be referenced in any stylesheet, script, or gadget (that I can find), and it causes errors when multiple licenses are present on one page (or on separate pages that are transcluded/exported into one, such as via tools:wsexport).

I propose that these are turned into class attributes.

Sam Wilson 01:58, 25 June 2019 (UTC)Reply

I concur. I see no reasons to use id attributes here, and several reasons why we shouldn't. --Xover (talk) 05:42, 25 June 2019 (UTC)Reply
  Done Sam Wilson 02:19, 26 June 2019 (UTC)Reply