Editing
Widget:ArticleSpawner/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example == === No parameters === <pre> {{#widget: ArticleSpawner}} </pre> {{#widget: ArticleSpawner}} An ArticleSpawner widget with no parameters displays an Article Title field and Submit button; filling the field and clicking submit is equivalent to clicking a link for an article with the same title. === Basic parameters === <pre> {{#widget: ArticleSpawner | title = Squealy Nord | submit = Create an article }} </pre> {{#widget: ArticleSpawner | title = Squealy Nord | submit = Create an article }} You can fill the Article Title field and Submit button with custom text. Note that the user can still edit the title. === Button with no fields === <pre> {{#widget: ArticleSpawner | title = Squealy Nord | showtitle = no | submit = Create the "Squealy Nord" article now! | summary = Finally created the Squealy Nord article }} </pre> {{#widget: ArticleSpawner | title = Squealy Nord | showtitle = no | submit = Create the "Squealy Nord" article now! | summary = Finally created the Squealy Nord article }} This button creates an article using [[Squealy Nord]] as the tile, and fills in the edit summary. === Preload template === <pre> {{#widget: ArticleSpawner | type = Biography | summary = New real-world person article | submit = New biography }} </pre> {{#widget: ArticleSpawner | type = Biography | summary = New real-world person article | submit = New biography }} When the user fills in a title and clicks the "New biography" button, it takes them to the article page, applies the {{tl|ArticleSpawner/Biography}} preload template to the edit box, and displays the {{tl|ArticleSpawner/Biography/doc}} content above the edit box. === Parameterized preload template === <pre> {{#widget: ArticleSpawner | type = Biography | summary = New real-world freelancer article | param.Name = | param.Navbox target = freelance | param.Role category = [[Category:Authors]] | hiddenparam = [[Category:Freelance contributors]] | hiddenparam = Freelancer | submit = New biography }} </pre> {{#widget: ArticleSpawner | type = Biography | summary = New real-world freelancer article | param.Name = | param.Navbox target = freelance | param.Role category = [[Category:Authors]] | hiddenparam = [[Category:Freelance contributors]] | hiddenparam = Freelancer | submit = Freelancer biography }} For preload templates with preload parameters ({{xt|$1}}, {{xt|$2}}, {{xt|$3}}, etc.), clicking the "Freelancer biography" button opens the article page, preloads the {{tl|ArticleSpawner/Biography}} template and fills the preload parameters with the '''param''' and '''hiddenparam''' values in order ('''param.Name''' replaces {{xt|$1}}, '''param.Navbox target''' replaces {{xt|$2}}, '''param.Role category''' replaces {{xt|$3}}, the first '''hiddenparam''' replaces {{xt|$4}}, etc.), and displays the {{tl|ArticleSpawner/Biography/doc}} content above the edit box. Note that if the '''hiddenparam'''s were placed before the '''param'''s, they would '''''not''''' be applied before the '''param'''s. The widget processes all '''param'''s in order first, ''then'' all '''hiddenparam'''s in order.
Summary:
Please note that all contributions to 2d4chan may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
2d4chan:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information