قالب:Tlc/شرح
This is the لووب القالب المحدد: قالب:Tlc
</noinclude> template.
This page is also the documentation for {{tld}} and {{tlf}} that work almost exactly the same.
When showing a template اسم with brackets in documentation you have to escape the brackets in some way so it doesn't become a call to the template. Instead of using <nowiki></nowiki>
tags you can write it simpler and shorter by using these templates.
Here is how these templates look. Code to the left and actual rendering to the right:
{{tlc|اسم|parameters}}
</noinclude> = {{اسم|parameters}}
</noinclude>
{{tld|اسم|parameters}}
</noinclude> = {{اسم|parameters}}
{{tlf|اسم|parameters}}
</noinclude> = {{اسم|parameters}}
These templates work similarly to {{قا}} and {{tlx}}
, but they don't make the template اسم into a link. When writing documentation you might want to avoid a lot of unnecessary links, since it decreases readability. So on the first occurrence of a template اسم use {{قا}} or {{tlx}}
, and then use لووب القالب المحدد: قالب:Tlc
</noinclude>, {{tld}}
or {{tlf}}.
Features of لووب القالب المحدد: قالب:Tlc
</noinclude>, {{tld}}
and {{tlf}}:
- They show a template اسم and up to eight parameters.
- They also show empty parameters. (See examples below.)
- They prevent line wraps in their output.
أمثلة
تعديلWikitables make the <code></code>
tags transparent, that's why the "code colouring
" is missing in these examples.
الكود | النتيجة | ملاحظة |
---|---|---|
لووب القالب المحدد: قالب:Tlc
</noinclude> | {{tlc|...}}
</noinclude> | Shows its own syntax. |
{{tlc|اسم}}
</noinclude> |
| |
{{tlc|اسم|one}}
</noinclude> | {{اسم|one}}
</noinclude> | |
{{tlc|اسم|one|two}}
</noinclude> | {{اسم|one|two}}
</noinclude> | |
{{tlc|اسم|a|b|c|d|e|f|g|h|i|j}} | {{اسم|a|b|c|d|e|f|g|h}}
</noinclude> | Shows up to eight parameters. The rest are dropped. |
{{tlc|اسم|||three|four}}
</noinclude> | {{اسم|||three|four}}
</noinclude> | Also shows empty parameters. |
{{tlc|اسم|||three||}}
</noinclude> | {{اسم|||three||}}
</noinclude> | Even shows empty parameters that come in the end. |
{{tlc|اسم|one=a|two=b}}
</noinclude> |
| Equal signs is a problem, but there is a fix. |
{{tlc|اسم|2=one=a|3=two=b}}
</noinclude> | {{اسم|one=a|two=b}}
</noinclude> | Use numbered parameters to fix it. Remember to start from 2, since the "اسم" is number 1. |
If you have equal signs in your template parameters then it probably is simpler and clearer to code it using <nowiki>
tags etc. Here are the codes to emulate {{tlf}}, {{tld}}
and لووب القالب المحدد: قالب:Tlc
</noinclude> respectively. Code to the left and actual rendering to the right:
<nowiki>{{اسم|one=a|two=b}}</nowiki>
= {{اسم|one=a|two=b}}
<tt><nowiki>{{اسم|one=a|two=b}}</nowiki></tt>
= {{اسم|one=a|two=b}}
<code><nowiki>{{اسم|one=a|two=b}}</nowiki></code>
={{اسم|one=a|two=b}}
انظر أيضاً
تعديل- {{tlc}} – Not linked, several parameters and text in
<code></code>
style. - {{tld}} – Not linked, several parameters and teletype text style.
- {{tlf}} – Not linked, several parameters and normal text style.
- {{قا}} – Template link, no parameters and normal text style.
- {{tlx}} – Template link, several parameters and interwiki links, teletype text style.
- {{tn}} – Same as {{قا}}, but shows the braces as part of the link.