الگو:Subst check top/توضیحات

از ویکی‌پدیا، دانشنامهٔ آزاد

استفاده[ویرایش]

Place this template and {{substcheckbottom}} onto the main template in the following manner.

{{{{{|safesubst:}}}substchecktop|[template pagename]|subst={{{subst|}}}}}

...template code...

{{{{{|safesubst:}}}substcheckbottom|subst={{{subst|}}}}}

This template, along with {{substcheckbottom}}, will check the main template for substitution and give an error message if it has been accidentally transcluded by having this template placed above the main template code and {{substcheckbottom}} placed below the main template code.

This template takes in an input for the main template name as a parameter. This is shown above as [template pagename]. This parameter should be entered so that the default error message refers to the correct main template. This default error message can be optionally replaced by a custom error message by using the message parameter. This parameter accepts templates and it is recommended that a message template be used for long messages to keep the parameter value short. {{substcheckbottom}} takes in an input for categories. This is so that unsubstituted versions of the main template can still categorise pages. This can be done by adding the name of the category to the category parameter. There is also a sort parameter to allow category sorting.

Both this template and {{substcheckbottom}} use subst={{{subst|}}} as one of the parameters. This allows optional transclusion for demonstration purposes by setting the subst parameter on the main template to nosubst.

الگوهای مرتبط[ویرایش]

فهرست الگوهای کمکی جانشانی
  • {{نیازمند جانشانی}} – نیاز به جانشانی را نشان می‌دهد.
    • {{جانشانی شده}} – برای توضیحات الگوهای فوق؛ پیامی را نشان می‌دهد که درخواست جانشانی الگو را در خود دارد.
    • {{هرگز جانشانی نشود}} – برعکس {{جانشانی شده}} است. برای مستندات الگوهایی که تباید جانشانی شوند؛ پیامی را نشان می‌دهد که از شما می‌خواهد که از جانشانی کردن الگو، خودداری کنید.
    • {{قابل جانشانی}} – برای مستندات الگوهایی که جانشانی کردن آن‌ها اختیاری است.
    • {{جانشانی‌کردن}} – امکان درج آزادانهٔ توضیح دربارهٔ این که آیا الگو باید جانشانی شود یا خیر را فراهم می‌کند و قابلیت درج توضیحات اضافی را نیز دارد.
  • {{اگرجا}}: در صورت جانشانی شدن "yes" را نشان می‌دهد.
  • {{جاشده}}: نشان می‌دهد که آیا جانشانی شده یا نه.
  • پودمان:Unsubst – از جانشانی جلوگیری می‌کند.
  • پودمان:Unsubst-infobox – از جانشانی جعبه‌های اطلاعات جلوگیری می‌کند، پارامترها را نیز تمیزکاری می‌کند.