Шаблон:Suplink
Материал из проекта «Повелитель Тайн Вики»
Дополнительные действия
Документация шаблона (для шаблона выше, иногда скрытого или невидимого)
Примечание: части шаблона или весь шаблон могут быть не видны без заданных значений.
Примечание: части шаблона или весь шаблон могут быть не видны без заданных значений.
| Шаблон | Документация | Использование |
This template generates chapter tooltips. It's designed for linking books and chapters with a tooltip for additional information.
Usage
{{Suplink|<book>|<chapter>|<format (Optional)>|<class (Optional)>|<parens (Optional)>}}
Parameters
book (required)
- Specifies the book number (e.g.,
1for Lord of Mysteries). - Maps to predefined data in the Lua module.
- Example:
1,2.
chapter (optional)
- Specifies the chapter number within the book.
- If omitted, the tooltip will display only the book information.
- Example:
23.
format (optional)
- Determines how the chapter is displayed:
ch: Adds the text "Ch." before the chapter number.- Empty or omitted: Displays just the chapter number.
class (optional)
- CSS class for additional styling.
parens (optional)
trueto adding parentheses()around the text.
Examples
Basic Usage (Book Only)
Displays the tooltip for book with no chapter.
{{suplink|1}}
yields:
Book and Chapter
{{suplink|1|122}}
yields:
Full Format with Chapter Text
{{suplink|1|122|ch}}
yields:
Custom Styling with a Class
Displays the tooltip with the CSS class in wiki's stylesheet (e.g., MediaWiki:CommonStyles.css)
{{suplink|1|122|class=caption}}
yields:
Add parentheses
To add parentheses around the tooltip text
{{suplink|1|122|parens=true}}
yields:
(
Combine all parameters
{{suplink|1|122|ch|class=caption|parens=true}}
yields:
(
Чтобы изменить этот текст, перейдите на Template:Suplink/doc (как это работает?)