แม่แบบ:Category link
[[:หมวดหมู่:|หมวดหมู่:]]
{{Cl|category name}}{{Cl|Category:category name}}{{Cl|category name|link text}}{{Cl|category name|link text|count=yes}}{{Cl|category name|link text|count=yes|count_type=type}}{{Cl|category name|link text|count=yes|count_type=type|backlog=backlog threshold}}
{{category link}} or its alias {{cl}} produces a link to a category in a similar fashion to {{Tl}} for a template. For example:
- {{Cl|ทวีปแอฟริกา}} produces: หมวดหมู่:ทวีปแอฟริกา
To specify the text used for the link, add it as a second parameter:
- {{Cl|ทวีปแอฟริกา|this category}} produces: this category
To add a count of everything in the category, add the |count=yes parameter:
- {{Cl|ทวีปแอฟริกา|count=yes}} produces: หมวดหมู่:ทวีปแอฟริกา ( 53 )
If you just want to get a count of pages, files, or subcats, use the |count_type= parameter:
- {{Cl|ทวีปแอฟริกา|count=yes|count_type=all}} produces: หมวดหมู่:ทวีปแอฟริกา ( 53 ) (default)
- {{Cl|ทวีปแอฟริกา|count=yes|count_type=pages}} produces: หมวดหมู่:ทวีปแอฟริกา ( 24 )
- {{Cl|ทวีปแอฟริกา|count=yes|count_type=subcats}} produces: หมวดหมู่:ทวีปแอฟริกา ( 29 )
- {{Cl|ทวีปแอฟริกา|count=yes|count_type=files}} produces: หมวดหมู่:ทวีปแอฟริกา ( 0 )
If you want to make counts standout for categories that have a backlog, use |backlog=:
- {{Cl|ทวีปแอฟริกา|count=yes|backlog=20}} produces: หมวดหมู่:ทวีปแอฟริกา ( 53 )
See also
[แก้]- {{C}}, which produces output such as: ทวีปแอฟริกา
- {{Clc}}, which produces output such as: หมวดหมู่:ทวีปแอฟริกา (53) and หมวดหมู่:ทวีปแอฟริกา (24)
- {{lc}}, which produces output such as: หมวดหมู่:ทวีปแอฟริกา (แก้ไข | คุย | ประวัติ | ลิงก์ | เฝ้าดู | ปูม)
- {{lcs}}, which produces output such as (แก้ไข คุย ลิงก์ ประวัติ)
- {{tl}}, which links produces a link to a template surrounded by template-style double-braces (e.g. {{ทวีปแอฟริกา}}).
- หมวดหมู่:Internal category-link templates
- หมวดหมู่:Internal link templates
- {{Category see also}}
| แม่แบบ | ตัวอย่างผลลัพธ์ |
| {{c}} | Example |
| {{cl}} | หมวดหมู่:Example |
| {{cconly}} | แม่แบบ:Cconly |
| แม่แบบ | ตัวอย่างผลลัพธ์ |
| {{clc}} | หมวดหมู่:Example (0) |
| {{lc}} | หมวดหมู่:Example (แก้ไข | คุย | ประวัติ | ลิงก์ | เฝ้าดู | ปูม) |
| {{lcs}} | (แก้ไข คุย ลิงก์ ประวัติ) |
This template creates a link to a category and optionally displays the page count. If the page count exceeds a backlog threshold, it will be highlighted.
| พารามิเตอร์ | คำอธิบาย | ชนิด | สถานะ | |
|---|---|---|---|---|
| Category name | 1 | The name of the category to link to.
| สตริง | จำเป็น |
| Display text | 2 | The text to display for the link. If not provided, the category name is used.
| สตริง | ไม่บังคับ |
| Show count | count | Specifies whether to display the number of pages in the category.
| ตรรกะ | ไม่บังคับ |
| Backlog threshold | backlog | The threshold for the page count. If the count exceeds this value, it will be highlighted.
| จำนวน | ไม่บังคับ |
| Count type | count_type | Specifies the type of count to display (e.g., pages, files, or subcategories).
| สตริง | ไม่บังคับ |