Diferencia entre revisiones de «Wikinoticias:Asistente»

Contenido eliminado Contenido añadido
Línea 8:
 
== Conventions ==
* All the pages of a given assistant are subpages of one parent, which is a child of this page: "parent <code>WN:Assistant/&lt;name&gt;</code>, children <code>WN:Assistant/&lt;name&gt;/...</code>". The parent page is a redirect to one of the subpages, and the primary documentation page for the assistant is a subpage "<code>WN:Assistant/&lt;name&gt;/doc</code>".
* Some subpages of an assistant are meant to be accessed by naming them to the [[WN:Dialog/do/doc#Verb: view|view verb]]; some subpages are are meant to be transcluding them onto another page; and some are made to be accessed either way. The entry point of the assistant should also behave gracefully when accessed directly as a wiki page, so it should use {{tl|dialog/ifsupported}}. To keep these different access modes, with their different behaviors, manageable, follow these principles:
:* Use either {{tl|assistant/viewable}} or {{tl|assistant/transclude}} on each page, and note this in the documentation for the page.
Línea 15:
:* When using a parameter via markup <code><nowiki>{{{...}}}</nowiki></code>, don't nest another template parameter in its default value, such as <code><nowiki>{{{foo|{{{bar}}}}}}</nowiki></code>. Non-nesting preserves substitutability by dialog parameters, since dialog parameters are (as of this writing) only substituted for non-nested template parameters.
:* When specifying a data field corresponding to an input parameter, specify the template parameter as an initial value, such as <code><nowiki>{{dialog/text|id=foobar|{{{foobar|}}}}}</nowiki></code>. This works for any combination of page viewed or transcluded, parameter passed by template or not, and parameter passed by dialog or not.
:* When specifying a button on any page, always explicitly pass out of it all its input parameters (except things like <code>SUBJECT-CONTENT</code> that aren't passed through an action request). If any of these parameters isn't stored locally as a data field (e.g., via {{tl|dialog/text}} on the current page), explicitly specify the template parameter as a value for the outgoing dialog parameter, such as <code><nowiki>{{dialog/button/view|...|foobar::{{{foobar|}}}|...}}</nowiki></code>. This works for, again, any combination of page viewed or transcluded, parameter passed by template or not, and parameter passed by dialog or not.
 
== See also ==