সাহায্য:টেমপ্লেট: সংশোধিত সংস্করণের মধ্যে পার্থক্য

test
(test)
===মিশ্র এবং নামবিহীন প্যারামিটার===
===অবিস্তৃত প্যারামিটার===
===Parser functions===
{{main|mw:Help:ParserFunctions| l1 = parserFunctions extension |Help:Magic words#Parser_functions| l2 = core parser functions}}
Parser functions are the WikiMedia toolkit for simple branchings, calculations, text manipulations, and the like. As a group, they take one or more parameters and return a wikitext value based on the parameters. There are two basic forms for Parser functions (distinguished by whether a pound sign follows the opening brackets):
*Core parser functions, of the form <nowiki>{{functionName: parameter | parameter | ... }}</nowiki>. These functions are part of the core wikimedia software, and should be available in all projects.
*Parser functions from the parserFunctions extension, of the form <nowiki>{{#functionName: parameter | parameter | ... }}</nowiki>. These functions are part of the parserFunctions extension, and may not be available everywhere.
Parser functions are primarily used for the evaluation of [[#Parameters|parameters]] or [[#Magic words|magic words]], in order to produce different results in different contexts.
 
Core parser functions generally deal with text manipulation and WikiMedia specific tasks.
 
{| class="wikitable" style="text-align:center;" width="80%"
|+Examples of core parser functions
! width="30%" | Description !! width="40%" | Text Entered !! width="30%" | Result
|-
| Uppercasing text
|<nowiki>{{uc: Heavens to BETSY! }}</nowiki>
|{{uc: Heavens to Betsy! }}
|-
| Lowercasing text
|<nowiki>{{lc: Heavens to BETSY! }}</nowiki>
|{{lc: Heavens to BETSY! }}
|-
| Getting a namespace name
|<nowiki>{{NS: 1 }}</nowiki>
|{{NS: 1 }}
|-
| Getting a wikipedia URL
|<nowiki>{{fullurl: pagename }}</nowiki>
|{{fullurl: pagename}}
|}
 
The parserFunctions extension gives more more programming-oriented parser functions.
 
{| class="wikitable" style="text-align:center;" width="80%"
|+Examples of extension parser functions
! width="30%" | Description !! width="40%" | Text Entered !! width="30%" | Result
|-
| Testing between options
|<nowiki>{{#ifeq: yes | yes | Hooray...! | Darn...! }}</nowiki><br><nowiki>{{#ifeq: yes | no | Hooray...! | Darn...! }}</nowiki>
|{{#ifeq: yes | yes | Hooray...! | Darn...! }}<br>{{#ifeq: yes | no | Hooray...! | Darn...! }}
|-
| Testing if a parameter is set
|<nowiki>{{#if: {{{param|}}} | Hooray...! | Darn...! }}</nowiki>
|{{#if: {{{param|}}} | Hooray...! | Darn...! }}
|-
| making a calculation
|<nowiki>{{#expr: ( 27 * 46 / pi ) round 2 }}</nowiki>
|{{#expr: ( 27 * 46 / pi ) round 2 }}
|}
 
These functions are discussed in greater detail on their respective help pages.
 
==টেম্পলেট এর কাজ==
==টেম্পলেট ট্যাগ এর লেআউট==
১৯,৪৫৪টি

সম্পাদনা