Aiuto:Subst: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m ha spostato Wikipedia:Subst a Aiuto:Subst: vedi pag. di discussione
tolto testo già tradotto e varie
Riga 1:
{{TOC Aiuto}}
La parola chiave '''subst:''' (abbreviazione della parola [[Lingua inglese|inglese]] ''substitution'') può essere usata come prefisso in un [[Wikipedia:Template|template]] per modificare il modo in cui il software riproduce il template.
 
Line 13 ⟶ 14:
Le [[Aiuto:Variabili|variabili]] sono copiate come appaiono nel wikitext.
 
Se si prova a specificare dei parametri previsti dal template, come in <code><nowiki>{{subst:t2|R|s}}</nowiki></code>, i valori inseriti saranno presenti anche nel testo sostituito; se invece il template non prevede i parametri, viene accettata comela sintassi del comando subst, ma i valori dei parametri saranno ignorati.
 
== Benefici della sostituzione ==
Line 20 ⟶ 21:
* La sostituzione può anche essere adoperata per evitare i danni derivanti da vandalismi sulle pagine del template.
* L'osservazione dei risultati generati da un template substato può favorire un maggiore apprendimento delle espressioni del wikicode, le quali rimangono invece non visibili se il template non è substato.
* Alcuni template sono pensati appositamente per essere utilizzati soltanto con subst. Sono segnalati con {{tl|template non incluso}} e raccolti in [[:Categoria:Template usatinon col substinclusi]].
 
== Svantaggi della sostituzione ==
Line 28 ⟶ 29:
* Un template substato può aggiungere alla pagina una gran quantità di wikicode e di codice HTML, che potrà rendere difficile l'editazione della pagina per gli utenti che non conoscono questi codici.
* La sostituzione riduce la probabilità per i nuovi utenti di apprendere l'uso dei template.
* Se il template deve essere usato solo temporaneamente, è in genere preferibile evitare di substarlo: perché è alquanto complesso rimuovere o editare il risultato di template substati.
* Un template vandalizzato e substato genera danni difficili da riparare, perché la correzione del template non corregge anche il testo substato nelle pagine.
 
<!-- == Further reading ==
<!--
*[[:en:Wikipedia:Template substitution|Documentation on English Wikipedia]] -->
== Benefits of substitution ==
* Templates are often edited or deleted. When adding a template to a page, ask yourself if you want it to change as the template is edited. If your answer is "no", substitute the template you use.<br />An example of this is the {{tl|welcome}} template. The archives of a user's talk page should show the ''actual'' welcome message they received, not the ''current'' welcome message.
* If there is a template you would like to edit for one page, but you don't want to modify the template for all the pages that use it, and you don't want to make a new template, you can substitute the template; then you can make the modifications with a second edit.<br />For example: a template might be used with all the states in the United States and the District of Columbia. For an article about the District of Columbia the template may need to use different words. For this purpose, you can substitute the template and then fix the wording on the article about the District of Columbia.
* Substitution of frequently-used protected templates can be used to avoid damage caused by template vandalism.
* People can learn more complex wikicode by looking at the output of a substituted template. Using the same template without substitution does not show the template code to them.
 
[[Categoria:WikipediaAiuto]]
== Drawbacks of substitution ==
* When a template is substituted, the result is no longer linked to the template, so it will be hard to find all pages displaying that text. This problem can be solved by adding a link to the template in the template's code, or by using categories.
* A substituted template won't be updated when the master template is updated.
* Substitution increases the size of articles.
* A substituted template can add a lot of wiki-code or HTML to the article. This way, people who do not have enough skills may find it harder to edit the page.
* Substituting templates prevents newcomers from learning to use templates.
* If the template is just being used temporarily, it is usually better not to substitute. Substituted templates are much harder to remove or edit.
* When a vandalised template is substituted, it is more difficult to repair because it will not fix when the vandalised template is fixed.
 
== Further reading ==
*[[:en:Wikipedia:Template substitution|Documentation on English Wikipedia]]-->
 
[[Categoria:Wikipedia]]
 
[[ar:ويكيبيديا:نسخ القوالب]]