Manual talk:Creating pages with preloaded text

Add topic

Preloaded pages in Preview mode[edit]

Is there a way to put a new page with preloaded content in a preview mode (as if the user had just pushed the preview button) ?

--AkashicChacal 15:42, 5 May 2008 (UTC)Reply

There is user option in Preferences «Show preview on first edit», and I even think its this way by default. Anyway, yes, you can force preview or no preview with preview=yes (or preview=no) URL parameter. —AlexSm 19:29, 5 May 2008 (UTC)Reply

General How To regarding the Preload function[edit]

Maybe I'm utterly blind, but as of yet I fail to see how the inbuilt function Preload (included in the basic Mediawiki package, not via extension) would be set up to work. Basically, what I've expected to find is this: A user creates a new page (using any of the usual methods given) and sees the editor window opening with an already loaded Preload-page in it.

Yes, of course I've read how the index.php-parameter could be altered to force the preload to happen. Just that's not what I'd call a userfriendly preloading method. Users can type new page titles into their browsers address line, they can click the red link of a failed search result, they can create a new link on another page and click it... you get the drift, there are quite many methods to create a new page.

Simply put: Is there a method in the basic package to get a preloaded page on creation of a new page using any of the given page creation methods? And if yes, how would I go about to install it?

Thanks, --Carsten3m 16:16, 16 June 2008 (UTC)Reply

I believe the answer is "No". preload is useless without extensions, except for expert users whom you can tell "Copy this URL to your browser's location field and modify its title param with the name you want for your new page. -- skierpage 01:39, 13 July 2009 (UTC)Reply

Feature request: preloadtext="stuff this into edit box"[edit]

Hi. Preload is handy!

A dynamic (runtime) "preloadtext=#redirect:[[Target page title]]", say, would be cool, too.

Thanks. Saintrain 15:05, 15 September 2008 (UTC)Reply

A big UP to this request. --Megajoule (talk) 06:40, 20 February 2021 (UTC)Reply

ULR parameters to index.php[edit]

The explanation says: "Preloading can be done with a preload parameter in a URL". But how can I produce such a link in an article? I cannot find how to add URL parameters to a link in double square brackets... —someone 12:14, 20 Nov 2008 (UTC)

One approach to adding URL parameters is with the "magic word" fullurl:
{{fullurl:My Page name|action=edit&preload=Some_template}}
produces // You have the ugly URL with external link indicator, and you still have the problem of getting users to replace New page name with the actual page name of their new page. So if you can add extensions, <createbox> or <inputbox> is probably going to work better . -- skierpage 01:34, 13 July 2009 (UTC)Reply

Passing arguments to preloaded templates[edit]

I'm able to preload a template just fine, and it's really handy. Is there some way to also pass values for arguments to the template when preloading?-- 16:00, 14 July 2009 (UTC)Reply

I would also like to know whether this is possible. Thanks for any pointers. --Daniel Mietchen 12:19, 7 August 2009 (UTC)Reply

I found this and possible solution(s) in Bug 12853 --Goadeff (talk) 05:49, 16 June 2012 (UTC)Reply

Preloading "Subject/headline" Text Field[edit]

Is there a way to preload the "Subject/headline" text field when adding new comments in the discussion pages? Example. —Sledged (talk) 18:28, 23 January 2008 (UTC)Reply

There is a way now (was added some time ago): preloadtitle parameter, see Manual:Parameters to index.php. —AlexSm 19:29, 5 May 2008 (UTC)Reply
Here is an actual example: Ikip 03:35, 6 September 2009 (UTC)Reply

Categories and documentation of preload-templates[edit]

If you have the Extension:ParserFunctions installed, it is possible to add categories and a documentation on the preload-page itself (and interlanguage links if you like). Consider a template:a, which is called on a template:a/preload like:

| param1 =
| param2 =

You can add categories and the documentation to the template:a and make it show up if the pagename equals template:a/preload only:

{{#ifeq: {{FULLPAGENAME}} | template:a/preload | <categories for template:a/preload>   | <categories for template:a>   }}
{{#ifeq: {{FULLPAGENAME}} | template:a/preload | <documentation of template:a/preload> | <documentation of template:a> }}

Hope this is useful. --WiMu 17:09, 7 December 2009 (UTC)Reply

Preloading article and discussion page template[edit]

Is it possible to preload an article template together with a template of it's discussion page? If yes, how? - Bojae72 14:07, 7 July 2011 (UTC)Reply

Preloading from redlinks[edit]

Is it possible to define (preferably on a link-by-link basis) that if a given link is a redlink, clicking it should do a defined preload? 10:55, 14 February 2012 (EST)

I'd like to do this as well. My usecase: When refactoring recurring code as templates I often write the call to the not-yet-existing template and then create the template from the redlink. I'd like to preload the new template with some predefined text for the template documentation (e.g. purpose, usage, styling, etc.). Nakohdo (talk) 11:46, 7 September 2018 (UTC)Reply
This is functionality I've been looking for the past few days. My usecase is to preload some sections to new pages being created for organizational consistency across my wiki. 19:57, 5 December 2018 (CST)
Same here! I'd like to add a template to redlinked page creation... can't find a way to do so.


If a redirect page is designated as the preloaded page, its target page is actually preloaded.

For example,

  • A page named "Foo" redirects to "Bar" (#redirect [[Bar]]).
  • If an URL designates "Foo" as a preloaded page (http://domain/w/index.php?...&action=edit&preload=Foo),
  • "Bar" will be preloaded in the text box.

I checked this out, but the current manual does not describe it. Somebody add it, please. --Yes0song (talk) 11:34, 8 June 2012 (UTC)Reply

FYI: Use redlink=1 with preload to change action modes if the page exists[edit]

I found a way to get a link with a preload to change actions depending on whether or not the page exists.

In my project, we're trying to automate the process of creating new pages with the right names, branch locations and--ideally--some common boilerplate text. Preloading seemed the best way to do this. For this to work, users click on the same link in a parent page to either create/preload the new page (if it doesn't exist) or view the page (if it does exist). We're using an older version of wikimedia (1.15?) and I don't have control over it, so a lot of the extensions aren't available to me. I also don't know if it's some unique situation with the way our corporate namespace is set up.

Using preload as described on this page worked great to frontload some content when creating a new page. The only problem was that, once the page was created, it continued to open in edit mode. That was a non-starter. I needed it to open in view mode. I played around with the parameters and found a combination that seems to work right:

https://<corp domain>/index.php?title=<the new page title>&action=edit&redlink=1&preload=<name of preloading source page>

Hope this helps someone besides me!--SellaR 02:51, 4 December 2013 (UTC)

Indeed, this just helped me ;) Od1n (talk) 10:18, 4 February 2018 (UTC)Reply
thank you. I wish i woud have found this earlier :P. Cheers Tabat666

Passing parameters through an inputbox[edit]

I want to use a parameter. I figured out how to specify that in the URL, but what I need now is to be able to specify that parameter in the Extension:Inputbox (which makes a button). Does anyone know if that's possible? Whatamidoing (WMF) (talk) 19:17, 10 November 2014 (UTC)Reply

@Whatamidoing (WMF): As soon as someone merges gerrit:158906, you'll be able to do it. Jackmcbarn (talk) 04:57, 11 November 2014 (UTC)Reply
Cool! @Whatamidoing (WMF): It will be great if you could document this at the InputBox extension's page as soon as this was merged. --[[kgh]] (talk) 14:38, 12 November 2014 (UTC)Reply
Thanks! I'm looking forward to this. In the meantime, I think I'll come up with a backup plan, because I want to use this now, and even if it gets merged this minute, it will be a while before it percolates through the system. And, yes, if it works, there will be documentation, because I don't want to have to figure out how to do this more than once! Whatamidoing (WMF) (talk) 21:13, 12 November 2014 (UTC)Reply
Great, that's the spirit! Cheers --[[kgh]] (talk) 21:17, 12 November 2014 (UTC)Reply

Create pages with preloaded text without editing them first[edit]


is there a way to create a page with a preloaded templated and see the page already created without going through the editing area?

Basically I am using the InputBox extension to let the user create a subpage on Special:MyPage/ and I want that the he can see the new page without saving it first. I saw there is a preview parameter that can be triggered but I would really like to know if this can be avoided and the subpage can be saved and visualized with the preloaded text in just a single step.

Please provide a worked example for Wikimedia projects[edit]


I'm really struggling to make this work, I'm going to ask for specific help elsewhere but it would be very very useful to have a worked example.


--John Cummings (talk) 11:45, 23 May 2018 (UTC)Reply

Preloaded text containing EMPTY Template[edit]

Hi there, I'm looking to use the preload query functionality to pass the contents of an empty template to a new page. This way all the new pages that are created are still managed by the same original template. Instead, it parses the template and returns the content as wikimedia text, dissociating it from the template all together. Is it possible to pass an empty template through preload?

Cheers, -M --Malcolm.mcclintock (talk) 16:01, 4 February 2019 (UTC)Reply

Display error message if preload page doesn't exist[edit]

Is there any mechanism to display an error message if the preload title doesn't exist? Now it just silently fails. --Hunsvotti (talk) 16:42, 1 November 2019 (UTC)Reply

Interaction with Extension:TemplateStyles[edit]

Hi, thanks for this useful feature. I was wondering if there is a way to include <templatestyles> tags in the preloading process so that the CSS subpage of the preload template is taken into account. Currently, using Extension:InputBox, I am perfectly able to preload my template {{Foo}} even with preload parameters. However my <templatestyles src="Foo/styles.css" /> tag isn't loaded. And this takes me to a secondary question: what about CSS subpages of "sub-templates" used by my template {{Foo}} ? I am quite unable to find documentation on this. Should I look into Lua modules to get this type of feature ? Best, FunkyBeats99 (talk) 08:39, 31 July 2020 (UTC)Reply

@FunkyBeats99: Can you link to the page where this is happening? It's not entirely clear what you're trying to do. Jackmcbarn (talk) 20:51, 31 July 2020 (UTC)Reply

Forcing a preload on an existing page with an existing content[edit]

Hello. I discovered that preload doesn't happen to replace an already existing content. I guess this is intentional, because it may be destructive, but I'm actually trying to build myself a system of multiple user sandboxes on my Wikipedia user sandbox subpage, using preloaded content, and I actually need to replace previous content of an already developed article with the preloaded content, which is basically a notice that the sandbox is currently empty. However, I came across that it doesn't do that. I was able to create the pages with preloaded content, but couldn't get it to replace it. Can preloaded content be forced on an existing page with an existing content? I guess misuse of that system would be bannable if someone would basically vandalize someone else's sandbox with this functionality. Polda18 [] 11:20, 8 September 2022 (UTC)Reply

I recently learned that this function doesn't exist in the current version of this tool. I guess that adding a parameter that would essentially force the preload to replace the content of the page (clearing it basically) would be best solution to enable it. Something like forcepreload=yes or replacecontent=yes (the later actually sounds better). So the link that would clear a user sandbox could theoretically look something like this: That would be good. Polda18 [] 12:53, 9 September 2022 (UTC)Reply