求真百科歡迎當事人提供第一手真實資料,洗刷冤屈,終結網路霸凌。

模板:If pagename/doc檢視原始碼檢視歷史

事實揭露 揭密真相
前往: 導覽搜尋

模板介紹

使用方法

{{if pagename
<!-- Match on full pagename -->
| User:Example/test = Text for "User:Example/test".
| User:Example = Text for "User:Example".
| User talk:Example = Text for "User talk:Example".

<!-- Match on full basepage name, when on a basepage or its subpages -->
| User:Example/+ = Matches "User:Example" and "User:Example/test".

<!-- Match on pagename, when on a basepage -->
| Example = Matches "User:Example", "User talk:Example", "Template:Example" 
            and so on, but not "User:Example/something".

<!-- Match on full basepage name, when on a subpage -->
| User:Example/* = Matches "User:Example/something", but not "User:Example".
| User talk:Example/* = Matches "User talk:Example/something".

<!-- Match on basepage name, when on a subpage -->
| Example/* = Matches "User:Example/something" and "User talk:Example/something".

<!-- Match on subpage name -->
| /something = Any pagename that ends in "/something".
| /doc = Any pagename that ends in "/doc".

<!-- Match on partial subpage name (case-insensitive) -->
| /some* = Any subpage name beginning with "/some" or "/Some".
| /arch* = Matches "User talk:Example/Archive 1".

<!-- Default fallbacks -->
| basepage = Text for any basepage.
| subpage = Text for any subpage.
| other = Text for any page.
}}

範例

注意事項

參見

給模板編輯者的說明

模板結構

實現方法

編輯注意