More actions
Nema sažetka uređivanja |
Nema sažetka uređivanja |
||
| Redak 1: | Redak 1: | ||
Za više informacija o pojmu, pročitajte članak [[Transkluzija]]. | Za više informacija o pojmu, pročitajte članak [[Transkluzija]]. | ||
'''Transclusion''' refers to the inclusion of the content from one document within another document by [[Reference (computer science)|reference]]. In Wikipedia, transclusion means the [[MediaWiki]] software retrieving the content from a ''source'' ''page'', often a ''[[Hrvatska internetska enciklopedija:Predložak|template]]'', and incorporating it into the content of a ''target page''. | '''Transclusion''' refers to the inclusion of the content from one document within another document by [[Reference (computer science)|reference]]. In Wikipedia, transclusion means the [[MediaWiki]] software retrieving the content from a ''source'' ''page'', often a ''[[Hrvatska internetska enciklopedija:Predložak|template]]'', and incorporating it into the content of a ''target page''. | ||
== Kako radi transkluzija == | |||
Similar to creating a [[Hrvatska internetska enciklopedija:Stil|wikilink]] using double square brackets (<code><syntaxhighlight lang="wikitext" inline="">[[Pagename]]</syntaxhighlight></code>), a page can be transcluded as a template by enclosing its title in double curly braces or double curly brackets: <syntaxhighlight lang="wikitext" inline="">{{Namespace:Pagename}}</syntaxhighlight>. Any changes made to the source page, or template, are automatically reflected on all pages that include the transcluded content.{{refn|group=lower-alpha|A [[ | Similar to creating a [[Hrvatska internetska enciklopedija:Stil|wikilink]] using double square brackets (<code><syntaxhighlight lang="wikitext" inline="">[[Pagename]]</syntaxhighlight></code>), a page can be transcluded as a template by enclosing its title in double curly braces or double curly brackets: <syntaxhighlight lang="wikitext" inline="">{{Namespace:Pagename}}</syntaxhighlight>. Any changes made to the source page, or template, are automatically reflected on all pages that include the transcluded content.{{refn|group=lower-alpha|A [[Hrvatska internetska enciklopedija:Očisti stranicu|purge]] may occasionally be necessary to refresh target pages, ensuring they retrieve and display the latest content from the template or source page. This forces the MediaWiki software to clear the cached version of the page and reload it with the most up-to-date transcluded content.}} | ||
== Pravila imenskog prostora == | |||
If no [[Hrvatska internetska enciklopedija:Imenski prostor|namespace]] is specified, it is assumed to be in the [[Hrvatska internetska enciklopedija:Imenski prostor predložaka|Template namespace]]. To refer to a page in the [[ | If no [[Hrvatska internetska enciklopedija:Imenski prostor|namespace]] is specified, it is assumed to be in the [[Hrvatska internetska enciklopedija:Imenski prostor predložaka|Template namespace]]. To refer to a page in the [[Hrvatska internetska enciklopedija:Članak|Main article namespace]], it is necessary to prefix it with a colon (<code>:</code>). For example: | ||
* <syntaxhighlight lang="wikitext" inline="">{{Pagename}}</syntaxhighlight> is the same as <syntaxhighlight lang="wikitext" inline="">{{Template:Pagename}}</syntaxhighlight> | * <syntaxhighlight lang="wikitext" inline="">{{Pagename}}</syntaxhighlight> is the same as <syntaxhighlight lang="wikitext" inline="">{{Template:Pagename}}</syntaxhighlight> | ||
* <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="">{{Hrvatska internetska enciklopedija:Pretpostavite dobru namjeru}}</syntaxhighlight> will transclude from the page [[Hrvatska internetska enciklopedija:Pretpostavite dobru namjeru]] | ||
== Upravljanje transkluzijom == | |||
Transclusion and what content it includes or excludes can be modified by using the invisible [[Hrvatska internetska enciklopedija:Wikitext|wikitext]] tags {{tag|noinclude|open}}, {{tag|onlyinclude|open}}, {{tag|includeonly|open}}, and {{tag|section|open}} on the {{em|source page}}, as further outlined in {{Section link|Help:Transclusion|Transclusion markup|nopage=y}}.{{refn|group=lower-alpha|Transclusion relies on functions that parse the source page, meaning that the appropriate wikitext markup must be present on the ''source page'' for it to correctly include or exclude content. The specific tags used for this purpose determine how the content will be transcluded into the target page. Properly implementing these tags allows editors to control the visibility of certain parts of the content based on the needs of the target page.}} The first three tags enable {{Section link|Pomoć:Transkluzija|Djelimična transkluzija|nopage=y}}, as opposed to the default behavior of double curly braces, which will transclude the entire source page's content. For {{Section link|Help:Transclusion|Selective transclusion|nopage=y}}, the {{tag|includeonly|open}} or {{tag|section|open}} tags can be used and sections of the source page named, then using [[Hrvatska internetska enciklopedija:Parserske funkcije|parser functions]] the template can be called with the section name as a [[Help:Template#Parameters|parameter]]: <syntaxhighlight lang="wikitext" inline="">{{#section:Pagename|Sectionname}}</syntaxhighlight>. | Transclusion and what content it includes or excludes can be modified by using the invisible [[Hrvatska internetska enciklopedija:Wikitext|wikitext]] tags {{tag|noinclude|open}}, {{tag|onlyinclude|open}}, {{tag|includeonly|open}}, and {{tag|section|open}} on the {{em|source page}}, as further outlined in {{Section link|Help:Transclusion|Transclusion markup|nopage=y}}.{{refn|group=lower-alpha|Transclusion relies on functions that parse the source page, meaning that the appropriate wikitext markup must be present on the ''source page'' for it to correctly include or exclude content. The specific tags used for this purpose determine how the content will be transcluded into the target page. Properly implementing these tags allows editors to control the visibility of certain parts of the content based on the needs of the target page.}} The first three tags enable {{Section link|Pomoć:Transkluzija|Djelimična transkluzija|nopage=y}}, as opposed to the default behavior of double curly braces, which will transclude the entire source page's content. For {{Section link|Help:Transclusion|Selective transclusion|nopage=y}}, the {{tag|includeonly|open}} or {{tag|section|open}} tags can be used and sections of the source page named, then using [[Hrvatska internetska enciklopedija:Parserske funkcije|parser functions]] the template can be called with the section name as a [[Help:Template#Parameters|parameter]]: <syntaxhighlight lang="wikitext" inline="">{{#section:Pagename|Sectionname}}</syntaxhighlight>. | ||
== Transkluzija i supstitucija == | |||
Transclusion events occur each time the ''target page'' is loaded and the template is rendered. A related event is [[Hrvatska internetska enciklopedija:Zamjena|Substitution]], where a template call is replaced with its transcluded source content at the time it is invoked in a ''one-time'' inclusion of the content. Unlike transclusion, which continuously updates the target page with changes from the source, substitution results in a ''one-time'' inclusion of the content, meaning that subsequent updates to the source content ''will not'' be reflected in the target page. For example, a template call for <syntaxhighlight lang="wikitext" inline="">{{Pagename}}</syntaxhighlight> with the <syntaxhighlight lang="wikitext" inline="">subst:</syntaxhighlight> prefix results in the substitution template call <syntaxhighlight lang="wikitext" inline="">{{subst:Pagename}}</syntaxhighlight>. When invoked, this template is replaced, also referred to as substituted, with the actual wikitext of the source page at the time of the call, thereby making it a permanent part of the target page.{{refn|group=lower-alpha|In simpler terms, the page is ''published'' or ''saved'', and any future changes to the source page will not affect this substituted content.}} | Transclusion events occur each time the ''target page'' is loaded and the template is rendered. A related event is [[Hrvatska internetska enciklopedija:Zamjena|Substitution]], where a template call is replaced with its transcluded source content at the time it is invoked in a ''one-time'' inclusion of the content. Unlike transclusion, which continuously updates the target page with changes from the source, substitution results in a ''one-time'' inclusion of the content, meaning that subsequent updates to the source content ''will not'' be reflected in the target page. For example, a template call for <syntaxhighlight lang="wikitext" inline="">{{Pagename}}</syntaxhighlight> with the <syntaxhighlight lang="wikitext" inline="">subst:</syntaxhighlight> prefix results in the substitution template call <syntaxhighlight lang="wikitext" inline="">{{subst:Pagename}}</syntaxhighlight>. When invoked, this template is replaced, also referred to as substituted, with the actual wikitext of the source page at the time of the call, thereby making it a permanent part of the target page.{{refn|group=lower-alpha|In simpler terms, the page is ''published'' or ''saved'', and any future changes to the source page will not affect this substituted content.}} | ||
== Transkluzija podataka == | |||
Moguće je unijeti podatke s Wikipodataka u Wikipedijske članke transkluzijom s Wikipodataka. | Moguće je unijeti podatke s Wikipodataka u Wikipedijske članke transkluzijom s Wikipodataka. | ||
== | ==Kako transkluzjia radi (2)== | ||
{{Transcluded section|Help:Transclusion/How Transclusion Works}} | {{Transcluded section|Help:Transclusion/How Transclusion Works}} | ||
{{/How Transclusion Works}} | {{/How Transclusion Works}} | ||
== | ==Transkluzijska sintaksa== | ||
The general [[Syntax (programming languages)|syntax]] for transclusion on Wikipedia follows the format <syntaxhighlight lang="wikitext" inline="">{{Namespace:Pagename}}</syntaxhighlight>, where <code>[[Hrvatska internetska enciklopedija:Imenski prostor|Namespace]]:[[Hrvatska internetska enciklopedija:Ime stranice|Pagename]]</code> specifies the [[Wikipedia:Title|title]] of a Wikipedia page. | The general [[Syntax (programming languages)|syntax]] for transclusion on Wikipedia follows the format <syntaxhighlight lang="wikitext" inline="">{{Namespace:Pagename}}</syntaxhighlight>, where <code>[[Hrvatska internetska enciklopedija:Imenski prostor|Namespace]]:[[Hrvatska internetska enciklopedija:Ime stranice|Pagename]]</code> specifies the [[Wikipedia:Title|title]] of a Wikipedia page. | ||
Posljednja izmjena od 21. studeni 2025. u 14:39
Za više informacija o pojmu, pročitajte članak Transkluzija.
Transclusion refers to the inclusion of the content from one document within another document by reference. In Wikipedia, transclusion means the MediaWiki software retrieving the content from a source page, often a template, and incorporating it into the content of a target page.
Kako radi transkluzija
Similar to creating a wikilink using double square brackets (), a page can be transcluded as a template by enclosing its title in double curly braces or double curly brackets: [[Pagename]]{{Namespace:Pagename}}. Any changes made to the source page, or template, are automatically reflected on all pages that include the transcluded content.[a]
Pravila imenskog prostora
If no namespace is specified, it is assumed to be in the Template namespace. To refer to a page in the Main article namespace, it is necessary to prefix it with a colon (:). For example:
{{Pagename}}is the same as{{Template:Pagename}}{{Stochastic processes}}will transclude from the page Template:Stochastic processes{{:Stochastic processes}}will transclude from the page Stochastic processes (an article, in the Main namespace){{Hrvatska internetska enciklopedija:Pretpostavite dobru namjeru}}will transclude from the page Hrvatska internetska enciklopedija:Pretpostavite dobru namjeru
Upravljanje transkluzijom
Transclusion and what content it includes or excludes can be modified by using the invisible wikitext tags , , , and on the Predložak:Em, as further outlined in § Transclusion markup.[b] The first three tags enable § Djelimična transkluzija, as opposed to the default behavior of double curly braces, which will transclude the entire source page's content. For § Selective transclusion, the or tags can be used and sections of the source page named, then using parser functions the template can be called with the section name as a parameter: {{#section:Pagename|Sectionname}}.
Transkluzija i supstitucija
Transclusion events occur each time the target page is loaded and the template is rendered. A related event is Substitution, where a template call is replaced with its transcluded source content at the time it is invoked in a one-time inclusion of the content. Unlike transclusion, which continuously updates the target page with changes from the source, substitution results in a one-time inclusion of the content, meaning that subsequent updates to the source content will not be reflected in the target page. For example, a template call for {{Pagename}} with the subst: prefix results in the substitution template call {{subst:Pagename}}. When invoked, this template is replaced, also referred to as substituted, with the actual wikitext of the source page at the time of the call, thereby making it a permanent part of the target page.[c]
Transkluzija podataka
Moguće je unijeti podatke s Wikipodataka u Wikipedijske članke transkluzijom s Wikipodataka.
Kako transkluzjia radi (2)
Predložak:Transcluded section Pomoć:Transkluzija/How Transclusion Works
Transkluzijska sintaksa
The general syntax for transclusion on Wikipedia follows the format {{Namespace:Pagename}}, where Namespace:Pagename specifies the title of a Wikipedia page.
Similar to creating a HIEpoveznicu using double square brackets (), a page can be transcluded as a template by enclosing its title in double curly braces: [[Pagename]]{{Namespace:Pagename}}. Any changes made to the source page, or template, are automatically reflected on all pages that include the transcluded content.[d]
Hrvatska internetska enciklopedija is structured using namespaces, which organize pages based on their function. For example, a page titled Predložak:Xtn belongs to the imenskom prostoru Hrvatska internetska enciklopedija, with Hrvatska internetska enciklopedija: as its namespace and Tips as its pagename. However, articles in the glavni imenski prostor, such as Predložak:Xtn, do not require a namespace prefix when linked using , as Hrvatska internetska enciklopedija assumes any wikilink without a specified namespace belongs to the Article namespace.
[[krumpir]]
When transcluding pages, if no namespace is specified, Wikipedia defaults to the Template namespace. To reference a page in the Article namespace within transclusion syntax, it must be explicitly prefixed with a colon :
(e.g., {{:Potato}}).
Pogreška u citiranju: oznake <ref> postoje za skupinu "lower-alpha", ali nema pripadajuće oznake <references group="lower-alpha"/>