साचा:Substcheck
Jump to navigation
Jump to search
SUBST
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[संपादन]
वरील दस्तावेजीकरण हे साचा:Substcheck/doc पासून आंतरविन्यासित आहेत. (संपादन | इतिहास) संपादक हे या साच्याच्या धूळपाटी (तयार करा | प्रतिबिंब) व चाचणी (तयार करा) पानात प्रयोग करुन बघु शकतात. कृपया वर्ग हे /doc उपपानावर टाकावेत. या साच्याची उपपाने बघा. |