Template:PageRef/doc: Difference between revisions

No edit summary
added lang parameter to doc
Line 39: Line 39:
<code><nowiki>{{PageRef|My cool page|no_file=true}}</nowiki></code>
<code><nowiki>{{PageRef|My cool page|no_file=true}}</nowiki></code>
{{PageRef|My cool page|no_file=true}}
{{PageRef|My cool page|no_file=true}}
Using lang with to override language (e.g., Russian):
<code><nowiki>{{PageRef|Lash|lang=/ru}}</nowiki></code>
{{PageRef|Lash|lang=/ru}}


=Parameters=
=Parameters=
Line 54: Line 58:
"type": "string"
"type": "string"
},
},
        "no_file": {
"no_file": {
            "label": "Do not use file",
"label": "Do not use file",
            "description": "Do not use any file; also use this parameter when a file doesn't exist. Note that passing 'false' does not make it use a file, the parameter must then be omitted. This is for code efficiency",
"description": "Do not use any file; also use this parameter when a file doesn't exist. Note that passing 'false' does not make it use a file, the parameter must then be omitted. This is for code efficiency",
            "required": false,
"required": false,
            "example": "true",
"example": "true",
            "type": "string"
"type": "string"
        },
},
"alt_name": {
"alt_name": {
"label": "Alternate Name",
"label": "Alternate Name",
Line 88: Line 92:
"required": false,
"required": false,
"example": "50"
"example": "50"
},
"lang": {
"label": "Language",
"description": "An optional language code to override the default language suffix in links (e.g., '/ru', '/zh-hans'). If omitted, `If_lang` template is used.",
"example": "/ru",
"type": "string"
}
}
},
},