(Created page with "The <code>_create</code> and <code>_edit</code> tags share a lot of functionality but they do not always share the same attribute names or their intended usage may differ slig...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
The <code>_create</code> and <code>_edit</code> tags share a lot of functionality but they do not always share the same attribute names or their intended usage may differ slightly. By presenting these attributes side by side, this table may help you on your way more quickly.
+
<div class="card" style="background-color:#eaedf1;"><div class="card-body">The <code>_create</code> and <code>_edit</code> tags share a lot of functionality but they do not always share the same attribute names or their intended usage may differ slightly. By presenting these attributes side by side, the following table may help you on your way more quickly.
  
{| class="wikitable"
+
{| class="table"
 
|-
 
|-
 
! _create
 
! _create
Line 11: Line 11:
 
|
 
|
 
|-  
 
|-  
| <code>mwwrite</code><br>page title, optionally in conjunction with <code>mwoption</code> or <code>mwleadingzero</code>
+
| <code>mwwrite</code><br>page title, optionally a formula in conjunction with <code>mwoption</code> or <code>mwleadingzero</code>
 
| <code>target</code><br>page id or page title
 
| <code>target</code><br>page id or page title
 
|-
 
|-
Line 23: Line 23:
 
|-
 
|-
 
| <code>mwfollow</code>
 
| <code>mwfollow</code>
| <span style="color:red;">x</span>, but you can set <code>mwreturn</code> in the <code>form</code> tag
+
| <span style="color:red;">x</span>
|
+
| If you know the name of the target page in advance, you can always set <code>mwreturn</code> in the <code>form</code> tag instead. <code>mwfollow</code> was specifically created for use cases where the title of the page to be created cannot be predicted.
 
|-
 
|-
 
| <code>mwfields</code><br>allows for multiple fields (comma-separated)
 
| <code>mwfields</code><br>allows for multiple fields (comma-separated)
Line 49: Line 49:
 
| can be used to set the value explicitly, without reading it from a form field.
 
| can be used to set the value explicitly, without reading it from a form field.
 
|}
 
|}
 +
</div></div>

Latest revision as of 12:28, 5 January 2025

The _create and _edit tags share a lot of functionality but they do not always share the same attribute names or their intended usage may differ slightly. By presenting these attributes side by side, the following table may help you on your way more quickly.
_create _edit comments
Can be used to create new pages
Can be used to edit existing pages
Cannot be used to edit a selection of fields on a page
Cannot be used to create new pages
Can be used to edit existing pages,
including select fields
mwwrite
page title, optionally a formula in conjunction with mwoption or mwleadingzero
target
page id or page title
specific to page creation:
  • mwleadingzero
  • mwoption
  • noseo
  • nooverwrite
x
mwfollow x If you know the name of the target page in advance, you can always set mwreturn in the form tag instead. mwfollow was specifically created for use cases where the title of the page to be created cannot be predicted.
mwfields
allows for multiple fields (comma-separated)
formfield
allows for single fields only
x usefield
mwslot mwslot
mwformat format wiki or json
mwtemplate template template name or JSON configuration
x value can be used to set the value explicitly, without reading it from a form field.