Discussioni aiuto:Template
Ultimo commento: 4 gen 2020 di Infernape4All.
Why are only administrators allowed to edit templates? --Infernape4All.discussioni 19:43, 30 dic 2019 (CET)
- Mainly for two reasons:
- Avoid to have problems in many pages caused by a single bad edit, not only vandalism but also mistakes made in good faith (it's much easier than one can imagine).
- Some overused templates should not be edited in the daytime since they can easily make the entire website go down.
- However, if you want to suggest edits/improvements feel free to write in the template's talk page. -- Lucas992 • Hai bisogno? O vuoi stalkerarmi? 13:27, 31 dic 2019 (CET)
- If we want template documentations, we would need its designated namespace, its talk namespace and a template that would transclude them, with this code:
{| style="background: #8cf; {{roundy|2.5ex}} width: 100%" |- {{#ifexist:Documentazione template:{{PAGENAME}}| ! colspan=2 class="big-text" {{!}} Il seguente contenuto è una documentazione di questo template. {{!}}- {{!}} style="background: white" class="roundy" colspan=2 | {{Documentazione template:{{PAGENAME}}}} {{!}}- {{!}} class="small-text" {{!}} Visita [[Documentazione template:{{PAGENAME}}]] per modificare questo testo! {{!}} style="text-align: right" {{!}} [ <span class="plainlinks">[{{fullurl:Template:{{PAGENAME}}|action=purge}} pulire la cache]</span> ] <span class="nomobile"> [ <span class="plainlinks">[{{fullurl:Template:{{PAGENAME}}|action=edit}} modifica]</span> ] [ <span class="plainlinks">[{{fullurl:Template:{{PAGENAME}}|action=history}} cronologia]</span> ]</span>| ! colspan=2 class="big-text error" | Errore: La documentazione di questo template non è stata ancora creata. Puoi crearlo [[Documentazione template:{{PAGENAME}}|qui]].}} |}
- Also, I'm not sure if I placed too much of the {{!}} magic word, or if it's missing in some places, but there MUST be a vertical pipe (|) character after the
</span> ]</span>
. A namespace index should be an even number, and it must be the following odd number for talk namespaces. Also, the {{documentation}} template should be placed always between <noinclude> tags. --Infernape4All.discussioni 21:31, 31 dic 2019 (CET)- Oh! I think the table should be written in HTML:
- Also, I'm not sure if I placed too much of the {{!}} magic word, or if it's missing in some places, but there MUST be a vertical pipe (|) character after the
<table style="background: #8cf; {{roundy|2.5ex}} width: 100%"> <tr> {{#ifexist:Documentazione template:{{PAGENAME}}| <th colspan=2 class="big-text">Il seguente contenuto è una documentazione di questo template.</th> </tr><tr> <td style="background: white" class="roundy" colspan=2>{{Documentazione template:{{PAGENAME}}}}</td> </tr><tr> <td class="small-text">Visita [[Documentazione template:{{PAGENAME}}]] per modificare questo testo!</td> <td style="text-align: right">[ <span class="plainlinks">[{{fullurl:Template:{{PAGENAME}}|action=purge}} pulire la cache]</span> ] <span class="nomobile"> [ <span class="plainlinks">[{{fullurl:Template:{{PAGENAME}}|action=edit}} modifica]</span> ] [ <span class="plainlinks">[{{fullurl:Template:{{PAGENAME}}|action=history}} cronologia]</span> ]</span><td>| <th colspan=2 class="big-text error">Errore: La documentazione di questo template non è stata ancora creata. Puoi crearlo [[Documentazione template:{{PAGENAME}}|qui]].</th>}} </table>
- So, I think it's better to write the table syntax in HTML rather than in wikicode. --Infernape4All.discussioni 10:13, 1 gen 2020 (CET)
- Creating a new namespace is too onerous with all the other work we have to do, and many templates already have documentation in their own page: example, another example. -- Lucas992 • Hai bisogno? O vuoi stalkerarmi? 22:19, 1 gen 2020 (CET)
- You're right, but if we would want to have a separate namespace for template documentations, it should not be protected, but single documentation pages may be protected if they are prone to vandalism. Yes, adding new namespaces is a server-side problem. --Infernape4All.discussioni 09:43, 2 gen 2020 (CET)
- I don't think we need a separate namespace for template documentation, they're fine in the page of the template. The only advantage I can see in doing it is that we can protect the template leaving the documentation unprotected, but given the number of users that know how to write a documentation I think the effort is by far not worth it. In case someone wants to edit a documentation it can do it in a sandbox, then ask an administrator to update the page --Ff300 (discussioni) 19:26, 2 gen 2020 (CET)
- So, template documentations would be free to edit, and any user can create it. The only needed thing is the "preload" for template documentations:
- I don't think we need a separate namespace for template documentation, they're fine in the page of the template. The only advantage I can see in doing it is that we can protect the template leaving the documentation unprotected, but given the number of users that know how to write a documentation I think the effort is by far not worth it. In case someone wants to edit a documentation it can do it in a sandbox, then ask an administrator to update the page --Ff300 (discussioni) 19:26, 2 gen 2020 (CET)
- You're right, but if we would want to have a separate namespace for template documentations, it should not be protected, but single documentation pages may be protected if they are prone to vandalism. Yes, adding new namespaces is a server-side problem. --Infernape4All.discussioni 09:43, 2 gen 2020 (CET)
- Creating a new namespace is too onerous with all the other work we have to do, and many templates already have documentation in their own page: example, another example. -- Lucas992 • Hai bisogno? O vuoi stalkerarmi? 22:19, 1 gen 2020 (CET)
- So, I think it's better to write the table syntax in HTML rather than in wikicode. --Infernape4All.discussioni 10:13, 1 gen 2020 (CET)
<no<includeonly></includeonly>include>{{Intestazione della documentazione}}</no<includeonly></includeonly>include> Ecco la descrizione principale di template ==Uso== <pre> {{sintassi di utilizzo di template}} </pre> descrizione dei parametri ==Esempi== <pre>{{esempio di utilizzo}}</pre> Risultato:
- And the template {{Intestazione della documentazione}}* will look like this:

Questa pagina è una documentazione di template {{[[Template:{{{1}}}|{{{1}}}]]}}. Ulteriori informazioni sulla documentazione di template.
- Also, there could be a category for templates with associated documentation. --Infernape4All.discussioni 13:15, 4 gen 2020 (CET)