10,594
edits
(Created page with "<noinclude> {{pp-vandalism|small=yes}} {{Pp-move-indef}} </noinclude> {{redirect|BP:TRANS}} {{Broader|Transclusion}} {{Information page|H:TRANS|H:TRANSCL|BP:TRANS|BP:TRANSCL}} '''Transclusion''' means the inclusion of the content of one document within another document by reference. In Bharatpedia transclusion, the MediaWiki software will refer to the content of one page, the template, for inclusion into the content o...") Tags: Mobile edit Mobile web edit Advanced mobile edit |
Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
(2 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
* '''<syntaxhighlight lang="wikitext" inline>{{Stochastic processes}}</syntaxhighlight>''' will transclude from the page [[:Template:Stochastic processes]] | * '''<syntaxhighlight lang="wikitext" inline>{{Stochastic processes}}</syntaxhighlight>''' will transclude from the page [[:Template:Stochastic processes]] | ||
* '''<syntaxhighlight lang="wikitext" inline>{{:Stochastic processes}}</syntaxhighlight>''' will transclude from the page [[Stochastic processes]] (an article, in the Main namespace) | * '''<syntaxhighlight lang="wikitext" inline>{{:Stochastic processes}}</syntaxhighlight>''' will transclude from the page [[Stochastic processes]] (an article, in the Main namespace) | ||
* '''<syntaxhighlight lang="wikitext" inline>{{ | * '''<syntaxhighlight lang="wikitext" inline>{{Bharatpedia:Assume good faith}}</syntaxhighlight>''' will transclude from the page [[Bharatpedia:Assume good faith]] | ||
What will transclude from a page can be controlled with the tags <<nowiki/>noinclude>, <<nowiki/>onlyinclude> and <<nowiki/>includeonly> placed in the source page wikitext. (See [[#Markup|markup]], below.) The use of tags enables the template to transclude partially, otherwise the double curly braces will always transclude all content. For ''selective'' transclusion the <<nowiki/>includeonly> parts of the template are named (with the help of [[ | What will transclude from a page can be controlled with the tags <<nowiki/>noinclude>, <<nowiki/>onlyinclude> and <<nowiki/>includeonly> placed in the source page wikitext. (See [[#Markup|markup]], below.) The use of tags enables the template to transclude partially, otherwise the double curly braces will always transclude all content. For ''selective'' transclusion the <<nowiki/>includeonly> parts of the template are named (with the help of [[bp:parser functions|parser functions]]) and that template is then called with the [[Help:Template#Parameters|parameter]] <code>transcludesection=''name''</code>. | ||
Transclusion events occur every time the page is ''loaded'', when the template is rendered. Another use of the same mechanism is a one-shot ''[[Help:substitution|substitution]]'' of the template call itself by its transcluded source page. A template call <code>{<nowiki/>{''[[WP:page name#Namespace, pagename, and fullpagename|fullpagename]]''}}</code> with the "subst:" prefix <syntaxhighlight lang="wikitext" inline>{{subst:fullpagename}}</syntaxhighlight> is transcluded once but never again, because the wikitext of that call is replaced (substituted) when its page is ''saved''. What was a one-time template call becomes the actual wikitext of the template at the time of its call. | Transclusion events occur every time the page is ''loaded'', when the template is rendered. Another use of the same mechanism is a one-shot ''[[Help:substitution|substitution]]'' of the template call itself by its transcluded source page. A template call <code>{<nowiki/>{''[[WP:page name#Namespace, pagename, and fullpagename|fullpagename]]''}}</code> with the "subst:" prefix <syntaxhighlight lang="wikitext" inline>{{subst:fullpagename}}</syntaxhighlight> is transcluded once but never again, because the wikitext of that call is replaced (substituted) when its page is ''saved''. What was a one-time template call becomes the actual wikitext of the template at the time of its call. | ||
Line 77: | Line 77: | ||
|old = <span style="display:inline-block;padding:0 .5em;line-height:1.80em;border:1px solid;border-radius:3px;text-align:center;">[[File:Symbol thumbs up.svg |text-top|link=|alt=👍|16px]] {{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}</span> | |old = <span style="display:inline-block;padding:0 .5em;line-height:1.80em;border:1px solid;border-radius:3px;text-align:center;">[[File:Symbol thumbs up.svg |text-top|link=|alt=👍|16px]] {{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}</span> | ||
|fb = <span style="display:inline-block;padding:0 .5em;line-height:1.80em;cursor:pointer;font-weight:bold; font-family:'Helvetica',Arial,sans-serif; border-radius:3px; background:#1877f2; text-align:center;">[[File:Facebook like thumb.png |text-top|link=|alt=👍|16px]] <span style="color:#fff;">{{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}</span></span> | |fb = <span style="display:inline-block;padding:0 .5em;line-height:1.80em;cursor:pointer;font-weight:bold; font-family:'Helvetica',Arial,sans-serif; border-radius:3px; background:#1877f2; text-align:center;">[[File:Facebook like thumb.png |text-top|link=|alt=👍|16px]] <span style="color:#fff;">{{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}</span></span> | ||
|[[File: | |[[File:Bharatpedia like SVG.svg |25px|link=|alt=👍]] '''{{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}'''}}</syntaxhighlight> is saved, it would substitute that wikitext with the actual wikitext from the [[Template:Like]]. In practice, the main difference that this makes is that if an update happened to the wikitext of the Template:Like, it would not update any pages where <syntaxhighlight lang="wikitext" inline>{{#switch:{{lc:}} | ||
|old = <span style="display:inline-block;padding:0 .5em;line-height:1.80em;border:1px solid;border-radius:3px;text-align:center;">[[File:Symbol thumbs up.svg |text-top|link=|alt=👍|16px]] {{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}</span> | |old = <span style="display:inline-block;padding:0 .5em;line-height:1.80em;border:1px solid;border-radius:3px;text-align:center;">[[File:Symbol thumbs up.svg |text-top|link=|alt=👍|16px]] {{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}</span> | ||
|fb = <span style="display:inline-block;padding:0 .5em;line-height:1.80em;cursor:pointer;font-weight:bold; font-family:'Helvetica',Arial,sans-serif; border-radius:3px; background:#1877f2; text-align:center;">[[File:Facebook like thumb.png |text-top|link=|alt=👍|16px]] <span style="color:#fff;">{{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}</span></span> | |fb = <span style="display:inline-block;padding:0 .5em;line-height:1.80em;cursor:pointer;font-weight:bold; font-family:'Helvetica',Arial,sans-serif; border-radius:3px; background:#1877f2; text-align:center;">[[File:Facebook like thumb.png |text-top|link=|alt=👍|16px]] <span style="color:#fff;">{{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}</span></span> | ||
|[[File: | |[[File:Bharatpedia like SVG.svg |25px|link=|alt=👍]] '''{{#if:| {{PLURAL:|user likes|users like}} this.|{{#if:| [[User:|User:]] likes this.|Like}}}}'''}}</syntaxhighlight> had already been saved. | ||
===Magic words=== | ===Magic words=== |