Difference between revisions of "Template:Lc"

(Creation (as this is needed))
 
(Creation (as this is needed))
 
Line 1: Line 1:
 
{{Lx |1=:Category: |2={{PAGENAME:{{{1|<includeonly>{{</includeonly>PAGENAME<includeonly>}}</includeonly>}}}}} |3=Category talk |4=talk}}<!--
 
{{Lx |1=:Category: |2={{PAGENAME:{{{1|<includeonly>{{</includeonly>PAGENAME<includeonly>}}</includeonly>}}}}} |3=Category talk |4=talk}}<!--
  
--><noinclude>{{Documentation|Template:Ln/doc}}
+
--><noinclude>
 +
{{Template:Ln/doc}}
 
{{sandbox other| |
 
{{sandbox other| |
 
[[Category:Internal category-link templates]]
 
[[Category:Internal category-link templates]]
 
}}</noinclude>
 
}}</noinclude>

Latest revision as of 15:56, 30 May 2022

Category:PAGENAME (edit | talk | history | links | watch | logs)

About[edit]

This template and the other related templates listed below produce a series of links for a specified page that is generally, though not always, of the form:

Page (edit | talk | history | links | watch | logs)

The six links are:

editedit the page;
talk/subject – access its talk page (or if the target page is a talk page, its subject page);
history – access its edit history;
links – access the "what links here" feature;
watch – add the page to one's watchlist; and
log – access its logs.

The major difference between the templates is the "namespace" of the page to which it is applied.

Usage[edit]

Namespace Link to subject page Link to talk page
General {{pagelinks|FULL PAGE NAME}}
Same as for subject page
{{ln|NAMESPACE|PAGE NAME}} {{lnt|NAMESPACE|PAGE NAME}}
Article {{la|ARTICLE}} {{lat|ARTICLE}}
Template {{lt|TEMPLATE}} {{ltt|TEMPLATE}}
User {{lu|PAGE}} {{lut|PAGE}}[1]
Category {{lc|PAGE}} {{lct|PAGE}}
File {{lf|FILE}} {{lft|FILE}}
Portal {{lp|PORTAL}} {{lpt|PORTAL}}
Help {{lh|PAGE}} {{lht|PAGE}}
Module {{lmd|MODULE}} {{lmdt|MODULE}}

Examples[edit]

Code Result
{{pagelinks|Category:Help}} Category:Help (edit | talk | history | links | watch | logs)
{{pagelinks|Category talk:Help}} Category talk:Help (edit | subject | history | links | watch | logs)
{{ln|Category|Help}} Category:Help (edit | talk | history | links | watch | logs)
{{lnt|Category|Help}} Category talk:Help (edit | category | history | links | watch | logs)
{{la|BattleTech Universe}} BattleTech Universe (edit | talk | history | protect | delete | links | watch | logs)
{{lat|BattleTech Universe}} Talk:BattleTech Universe (edit | article | history | links | watch | logs)
{{lt|ln}} Template:Ln (edit | talk | history | links | watch | logs)
{{ltt|ln}} Template talk:Ln (edit | template | history | links | watch | logs)
{{lu|Deadfire}} User:Deadfire (edit | talk | history | links | watch | logs)
{{lut|Deadfire}} User talk:Deadfire (edit | user page | history | links | watch | logs)
{{lc|Help}} Category:Help (edit | talk | history | links | watch | logs)
{{lct|Help}} Category talk:Help (edit | category | history | links | watch | logs)
{{lf|Check icon green.svg}} File:Check icon green.svg (edit | talk | history | links | watch | logs)
{{lft|Check icon green.svg}} File talk:Check icon green.svg (edit | file | history | links | watch | logs)
{{lp|Example}} Portal:Example (edit | talk | history | links | watch | logs)
{{lpt|Example}} Portal talk:Example (edit | portal | history | links | watch | logs)
{{lm|Common.css}} MediaWiki:Common.css (edit | talk | history | links | watch | logs)
{{lmt|Common.css}} MediaWiki talk:Common.css (edit | message | history | links | watch | logs)

{{subst:ln|Category|Help}} results (or resulted) in this code:

{{lx|1=:{{ucfirst:Category}}:|2={{ucfirst:Help}}|3=:Category talk|4=talk}}

Note the important colon in 1=:, unnecessary (?) for other Lx namespaces.
Substituting both Lx and Ucfirst finally arrived at (line breaks added manually):

 <span class="plainlinksneverexpand">[[:Category:Stubs]] <tt>(</tt>
 [https://www.sarna.net/wiki/index.php?title=Category:Help&action=edit edit]<tt>|</tt>
 [[:Category talk:Help|talk]]<tt>|</tt>
 [https://www.sarna.net/wiki/index.php?title=Special:Whatlinkshere/:Category:Help&limit=999 links]<tt>|</tt>
 [https://www.sarna.net/wiki/index.php?title=Category:Help&action=history history]<tt>|</tt>
 [https://www.sarna.net/wiki/index.php?title=Category:Help&action=watch watch]<tt>)</tt></span>

See also[edit]

Template Example output
{{c}} Help
{{cl}} Category:Help
{{cls}} Cat:Help
Template Example output
{{cconly}} 45
{{clc}} Category:Help (45)
{{lc}} Category:Help (edit | talk | history | links | watch | logs)
{{lcs}} Category:Help (Edit Discussion links Page history)

TemplateData[edit]

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools.

TemplateData for Lc

Produces a series of links for a specified page.

Template parameters

ParameterDescriptionTypeStatus
11

Name of the target page.

Pagerequired
  1. For a similar template for user accounts, see Template:user