แม่แบบ:Substcheck
SUBST
![Documentation icon](http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
This template can be used in conditional processing in other templates to detect substitutions.
If you use Module:Unsubst, you need not use this template.
Usage
If you put <includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly>
into a template, it will expand into one of the following, depending how the template is being viewed.
- SUBST if the template is being substituted
- {{subst:substcheck}} if the template is being transcluded
- Empty string if you are viewing the template page.
Using this template differently may yield different results; the above is the most universal way.
Lua replacement
if mw.isSubsting() then-- substituting: "SUBST"elseif mw.getCurrentFrame():getParent():getTitle() == mw.title.getCurrentTitle().fullText then-- viewed directly: ""else-- transclusion: "{{subst:substcheck}}"end
See also
🔥 Top keywords: พระวรวงศ์เธอ พระองค์เจ้าเฉลิมศึกยุคลหน้าหลักพระสุนทรโวหาร (ภู่)องค์การกระจายเสียงและแพร่ภาพสาธารณะแห่งประเทศไทยพิเศษ:ค้นหาพระบาทสมเด็จพระวชิรเกล้าเจ้าอยู่หัวพระเจ้าวรวงศ์เธอ พระองค์เจ้าเฉลิมพลฑิฆัมพรอสมทวอลเลย์บอลหญิงเนชันส์ลีก 2024สไปร์ท (แร็ปเปอร์)ฟุตบอลชิงแชมป์แห่งชาติยุโรปฟุตบอลชิงแชมป์แห่งชาติยุโรป 2024พุ่มพวง ดวงจันทร์ดวงใจเทวพรหม (ละครโทรทัศน์)อีดิลอัฎฮาสมเด็จพระเจ้าบรมวงศ์เธอ เจ้าฟ้ายุคลทิฆัมพร กรมหลวงลพบุรีราเมศวร์ดอกเตอร์ไคลแมกซ์ ปุจฉาพาเสียวราชวงศ์จักรีลำดับโปเจียมแห่งราชอาณาจักรไทยรายชื่อตัวละครในพระอภัยมณีหม่อมเจ้านวพรรษ์ ยุคลทุติยจุลจอมเกล้าวิเศษพระเจ้าวรวงศ์เธอ พระองค์เจ้าภาณุพันธุ์ยุคลพระอภัยมณีหม่อมเจ้ามงคลเฉลิม ยุคลหม่อมเจ้าฑิฆัมพร ยุคลพระบาทสมเด็จพระจุลจอมเกล้าเจ้าอยู่หัวพระบาทสมเด็จพระมหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตรหลานม่าอริยสัจ 4ตารางธาตุนิราศภูเขาทองรายชื่อเครื่องดนตรีเฌอมาวีร์ สุวรรณภาณุโชคประเทศไทยอาณาจักรอยุธยาปิติ ภิรมย์ภักดีวอลเลย์บอลวอลเลย์บอลหญิงทีมชาติไทย