الگو:IsValidPageName
ظاهر
![]() | این الگو در ۵٬۰۰۰+ صفحه بهکار رفته است و تغییر دادن آن میتواند تأثیرات گستردهای داشته باشد. لطفاً تغییرات را در زیرصفحههای /تمرین یا /آزمایشی الگو، یا در زیرصفحهٔ کاربری خودتان بیازمایید. توصیه میشود که ابتدا در خصوص تغییرات مورد نظر در صفحهٔ بحث گفتگو کرده و سپس آنها را پیادهسازی کنید. |
This template returns "valid
" if the given page title is valid, or the empty string otherwise. The page does not need to exist in order for the template to return "valid
". As a convenience, the template treats "-
" as an invalid page title.
Usage
[ویرایش]{{#if: {{{1|}}} | {{#if: {{isValidPageName|{{{1}}}}} | [[{{{1}}}]] | {{{1}}} }} }}
Examples
[ویرایش]{{isValidPageName|Main Page}}
returns "معتبر است
"{{isValidPageName|[[]]}}
returns ""
{{isValidPageName|This page could not POSSIBLY exist, could it?}}
returns "معتبر است
"{{isValidPageName|-}}
returns "" (even though "-" can exist)
{{isValidPageName}}
returns ""
See also
[ویرایش]- {{isValidPageName}} at the English Wiktionary