User:Wlgrin/Template/DocumentTag-Notice-UserPage-EditPermissions-OwnerOnly/doc

Template is intended for use only by template. It produces reusable text stating that only the owner (and agents authorised by the owner) of the user page may edit the page.

Basic usage
Template takes two named parameters, all optional:
 * user-name is the name of the owner of the user page. By default, this parameter is blank, in which case the owner of the page is not named.
 * discussion-page-name is the full name of the user discussion page for the owner of this user page.
 * The value of this parameter will be automatically encoded (using ) to produce a valid link (for example, replacing white spaces with underscores).
 * By default, this parameter is blank, in which case the reference to the discussion page is not linked.


 * {| class="wikitable collapsible collapsed" style="min-width:30em;"

!style="text-align:left;"|Examples will produce Please, do not edit this user page unless you have been asked to do so by user MeMyselfEtMoi. Your comments are welcome on the discussion page. Omitting the discussion page name, like this: will instead produce Please, do not edit this user page unless you have been asked to do so by user MeMyselfEtMoi. Your comments are welcome on the page owner's discussion page. Omitting instead the page owner's user name, like this: will instead produce Please, do not edit this user page unless you have been asked to do so by its owner. Your comments are welcome on the discussion page.
 * style="padding:1em;"| For example, passing a server name, a page name and a link name like this:
 * style="padding:1em;"| For example, passing a server name, a page name and a link name like this:
 * }

Using substitution
Template can be safely substituted, since it uses the “safesubst” modifier to call parser functions and magic words, and it does not transclude any other page.

If you wish to substitute template instead of transcluding it, remember to also substitute any parser functions or magic words used in its parameter list. This is because the MediaWiki parser performs all substitutions before performing any transclusion.


 * {| class="wikitable collapsible collapsed" style="min-width:30em;"

!style="text-align:left;"|Examples will produce the likely unintended output Please, do not edit this user page unless you have been asked to do so by user MeMyselfEtMoi. Your comments are welcome on the discussion page. Notice, in the sample output above, how the URI of the link (hover over it to view it) was incorrectly produced and was set to point to an article named Discussion page. This is because will be substituted before  is resolved. By contrast, will produce the expected URI within the link: Please, do not edit this user page unless you have been asked to do so by user MeMyselfEtMoi. Your comments are welcome on the discussion page.
 * style="padding:1em;"| For example, using the following incorrect call (note the use of       without substitution):
 * style="padding:1em;"| For example, using the following incorrect call (note the use of       without substitution):
 * }