Template:Metatemplate
(Purpose: to create new templates in a consistent format)
(Purpose: to create template pages for temporary transclusions as article markup ‘cheat sheets’)
To do; from 4 August 2022
(Move to: Library:Daily notes/Unresolved/To do/2022-08-04; perhaps better to a named section, such as Library:Daily notes#Unresolved#2022-08-04??)
To do:
* Make template and prototype ‘subst’ statement to create an HTML comment in wikitext
  (make it language-neutral, e.g.:
    - Template:Subst produces: < ! - - comment - - > (without spaces, of course)
    - Template:Subst   produces: // comment
    - Template:Subst produces: # comment
    - Template:Subst    produces: /* comment */
    - Template:Subst   produces: ??
* Make similar templates for other types of markup and elements, e.g.:
    - URL links for setext / wikitext HTML / bbCode / GFM markdown / ‘communities’ sites / etc.
Demo for certain HTML tags:
(Move to: Template:Demo markup/HTML; perhaps better to a named section, such as Template:Demo markup#HTML??)
Semantic markup:
- Abbreviation; 
<abbr>Example contents</abbr> - Example contents
 <address>Example contents</address>- <address>Example contents</address>
 <addr>Example contents</addr>- <addr>Example contents</addr>
 - Citation; 
<cite>Example contents</cite> - Example contents
 - Computer code; 
<code>Example contents</code> Example contents- Definition; 
<dfn>Example contents</dfn> - Example contents
 - User input; 
<kbd>Example contents</kbd> - Example contents
 - Highlighted; 
<mark>Example contents</mark> - Example contents
 - Output sample; 
<samp>Example contents</samp> - Example contents
 - Math variable; 
<var>Example contents</var> - Example contents
 
Data:
- Time; 
<time>Example contents</time> - Time, machine-readable; 
<time parameter=??>Example contents</time> 
Other:
- Quotation; 
<q>Example contents</q> Example contents
- Strikethrough; 
<s>Example contents</s> Example contents- Insertion; 
<ins>Example contents</ins> - Example contents
 - Deletion; 
<del>Example contents</del> Example contents- Plain text; 
<span>Example contents</span> - Example contents
 
Archaic tags
🦬
(based on when introduced)
Prior to HTML 3.02:
(aka ‘tag soup’)
HTML 3.02:
HTML 4:
XHTML:
HTML 5:
Proposed for HTML, but never implemented:
- Universal header tag; 
<h> - Multiple levels would be rendered hierarchically at the time the page is loaded.
 
XML:
SGML:
Demo for certain MediaWiki ‘Magic Words’:
(Move to: Template:Demo markup/Wikitext/MediaWiki/Magic words; perhaps better to a named section, such as Template:Demo markup#Wikitext#MediaWiki Magic Words??)
Page variables
{{PAGENAME}}- Metatemplate
 {{ROOTPAGENAME}}- Metatemplate
 {{NAMESPACE}}- Template
 
{{localurl:full page name}}- /Full_page_name
 {{localurl:full page name |query=example}}- /w/index.php?title=Full_page_name&query=example
 {{fullurl:full page name}}- https://library.jimgrisham.com/Full_page_name
 {{fullurl:full page name |query=example}}- https://library.jimgrisham.com/w/index.php?title=Full_page_name&query=example
 {{canonicalurl:full page name}}- https://library.jimgrisham.com/Full_page_name
 {{canonicalurl:full page name |query}}- https://library.jimgrisham.com/w/index.php?title=Full_page_name&query
 {{filepath:file name}}{{filepath:testimagefile}}{{urlencode:test string}}- test+string
 {{urlencode:test string|PATH}}- test%20string
 {{urlencode:test string|WIKI}}- test_string
 {{anchorencode:test string}}- test_string
 {{ns:1}}- Talk
 {{nse:1}}- Talk
 {{#rel2abs:relative.file.path}}- relative.file.path
 {{#titleparts:example page name|2|first segment}}- Example page name
 {{#titleparts:{{ROOTPAGENAME}}|1}}- Metatemplate
 
<!-- Documentation from [[w:Help:Magic words#Paths]]:
Function		 	 	 	 	Description
- - - - - - - - - - - - - - - - - - - - - - - - 	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{localurl:fullpagename |query}} 	 	 	Relative path to page name. The query parameter is optional.
{{fullurl:fullpagename |query}}		 	 	Absolute path, without protocol prefix (i.e. without " http: " etc.), to page name. 
	 	 	 	 	 	 	 The query parameter is optional.
{{canonicalurl:fullpagename |query}} 	 	 	Absolute path, including protocol prefix, to page name. The query parameter is optional.
{{filepath:filename}}		 	 	 	Absolute path to the media file filename.
{{urlencode:string}}		 	 	 	Encodes string for use in URL query strings; 
							 {{urlencode:test string}}, for example, produces: test+string.
							 To encode string for use in URL paths or MediaWiki page names, 
	 	 	 	 	 	 	  append, respectively, |PATH or |WIKI (to produce "test%20string" or "test_string").
{{anchorencode:string}}		 	 	 	Input encoded for use in MediaWiki URL section anchors.
{{ns:n}}		 	 	 	 	Returns the name of the namespace whose index is the number n. 
	 	 	 	 	 	 	 For MediaWiki URLs, use {{nse:}}.
{{#rel2abs:path}}		 	 	 	Converts a relative file path to an absolute path.
{{#titleparts:fullpagename|number|first segment}}	Splits the fullpagename (title) into that number of segments.
-->
Namespace assignments
(Move to: Template:Debug templates/MediaWiki/Namespace)
(Per  {{ns:1}}  vs.  {{nse:1}} )
NS#: Name / URL prefix
Virtual
- -2: Special / Media
 - -1: Special / Special
 - 0: /
 
Core
- Talk / Talk
 - User / User
 - User talk / User_talk
 - Library / Library
 - Library talk / Library_talk
 - File / File
 - File talk / File_talk
 - MediaWiki / MediaWiki
 - MediaWiki talk / MediaWiki_talk
 - Template / Template
 - Template talk / Template_talk
 - Help / Help
 - Help talk / Help_talk
 - Category / Category
 - Category talk / Category_talk
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 - /
 
- -
 - 40: /
 - 50: /
 - 60: /
 - 70: /
 - 80: /
 - 90: /
 
WikiLexicalData
- 16: / (Expression: NS_EXPRESSION)
 - 17: / (Expression_talk:)
 - -
 - 24: / (DefinedMeaning: NS_DEFINEDMEANING)
 - 25: / (DefinedMeaning_talk:)
 
LiquidThreads
(90-99)
- 90: / (Thread: NS_LQT_THREAD)
 - 90: / (Thread_talk: NS_LQT_THREAD_TALK)
 - 92: / (Summary: NS_LQT_SUMMARY)
 - 93: / (Summary_talk: NS_LQT_SUMMARY_TALK)
 - -
 - 99: /
 
Extension and non-standard
- 100: /
 - 101: /
 - -
 - 118: /
 - 119: /
 - -
 - 710: /
 - 711: /
 - -
 - 828: / (e.g. Lua modules)
 - 829: /
 
Deprecated
- 2300: Gadget / Gadget
 - 2301: Gadget talk / Gadget_talk
 - 2302: Gadget definition / Gadget_definition
 - 2303: Gadget definition talk / Gadget_definition_talk
 
Removed
- Books
 - Education …
 
Old draft template
- Copied from https://en.wikipedia.com/wiki/User:Jim_Grisham/Templates/DraftLink on 2022-08-04
 
(Move to: Template:Metatemplate)
- [[Draft:{{{articlename}}}|Draft:{{{articlename}}}]] ([[Draft:Talk:{{{articlename}}}|talk]])
- Draft for: [[{{{articlename}}}|{{{articlename}}}]] ([[Talk:{{{articlename}}}|talk]]) | redirect (talk) | [[{{{articlename}}} (disambiguation)|disambiguation]] (disambiguation talk)
 - Deletion discussion / log: [[Wikipedia:Articles for deletion/{{{articlename}}}]] ([[Wikipedia:Articles for deletion/Talk:{{{articlename}}}|talk]]) / deletion log for ‘{{{articlename}}}’ (talk)
 - Wayback Machine: ( Earlist / All / Latest )
 - [[Special:WhatLinksHere/{{{articlename}}}|Articles linking to {{{articlename}}}]] ([[Special:WhatLinksHere/Talk:{{{articlename}}}|talk]])
 - [[Special:RecentChangesLinked/{{{articlename}}}|Recent changes linked to {{{articlename}}}]] ([[Special: RecentChangesLinked/Talk:{{{articlename}}}|talk]])
 - Edit history of {{{articlename}}} (talk)
 
 
Parameters
- articlename=
 - Literal article name (as normally used with wikilinks)
 - articleurlname=
 - Name with spaces replaced by ‘_’ and other characters made url-safe.
 - draftuser=
 - Username for which to search for ‘userspace drafts’ with this title (optional; reserved for future use)
 
- draftuserpath=
 - custom path prefix to use when ‘draftuser’ is provided and drafts are in a non-default userspace location (optional; reserved for future use)
 
- note=
 - Notes to be included in template output (optional; reserved for future use)
 - comment=
 - Hidden comments (only for wikitext source and perhaps HTML source output) (optional; reserved for future use)
 
Usage details
Example usage
{{User:Jim Grisham/Templates/Draftlink  |articlename=Templating language
  |articleurlname=Templating_language
}}
Example result
User:Jim Grisham/Templates/Draftlink
Showing footnotes
Show ‘Template:Tl’ templates by adding this to the page where the template is used, ~not~ to this template itself:
or
{{Notelist-talk}}
(Note: the first example is the equivalent of Template:Tlx.
See Template:Tl, Template:Tl, and Template:Tl for usage details.
(Move to: Template:Meta/Random notes)
Other
Other ‘special’ links:
(Namespace):Special:AllPages
{{{articleurlname}}}&action=show-download-screen
Templates
Miscellany
- Magic words (help)
- Info
- Manual:Magic words - technical reference
 - Help:Magic words
 - mw:Help:Magic words, including ‘standard’ parser functions
 
 - Types
- Parser functions
 
 
 - Info
 
- mw:Help:Extension:ParserFunctions - additional parser functions, including conditional expressions
 
- Variables
 
- Behavior switches
 
- Wiki markup
 
- Scripts
 
- Teahouse
 
- Village Pump
- [[WP:VPP|Policy]
 - Village pump (technical)
 - Proposals
 - Idea lab
 - WMF
 - Miscellaneous
 
 
- Page moves and restoration
 
- Userboxes (UBX)
 
- Category:Wikipedians by language
 - Also Wikipedia:Babel-N
 - mw:Extension:Babel
 - Module:Babel
- allows ‘nocat=true’ option
 
 
- Wikipedia:Userboxes/Programming
 
Template:Collapse bottom Template:Userboxbottom
- User page ‘top icons’
 
- Template:Tl
 - MediaWiki API
- [[mw:API:Iwbacklinks|API:iwbacklinks]: find
 
 
pages using prefix
- MediaWiki:Protect-text
- Special:ProtectedPages - protected from editing
 - Special:ProtectedTitles - cannot be created
 - Special:StablePages - pending changes protection
 
 
- Accessibility
- Wikipedia:Manual of Style § Scrolling lists and collapsible content
- Collapse vs. ‘hidden’ vs. Collapsible list
- ‘Hidden’ may not function on mobile themes phab:T111565
 
 
 - Collapse vs. ‘hidden’ vs. Collapsible list
 
 - Wikipedia:Manual of Style § Scrolling lists and collapsible content
 
- Needed articles
 
- meta:Namespace [3] (help) / Template programming
 - Inter-wiki prefixes (map / table):
- v: : Wikiversity
 - c: : Wikimedia Commons
 - d: : Wikidata
 - q: : Wikiquote
 - s: : Wikisource
 - w: : Wikipedia (list)
- de:w: : Germany
 - en:w: : English
 
 - mw: : MediaWiki
 - m: meta: : Meta-Wiki
 - voy: : Wikivoyage
 - wikt: : Wiktionary
 - mwf: :  Wikimedia Foundation
- mwau: : Australia
 - wmca: : Canada
 - wmde: : Germany
 - wmin: : India
 - wmes: : Spain
 - wmuk: : United Kingdom
 
 - phab: : Phabricator
- mediazilla: : MediaZilla
 - bugzilla: : Bugzilla
 
 - testwiki: : Test Wiki
 - toolforge: : Toolforge
 - wikitech: : Wikitech
 - ?: :