Help:My sandbox

Revision as of 08:57, 30 July 2021 by Glucas (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Pp-semi-indefTemplate:Wikipedia how-to

My sandbox is a feature which gives you a place to practice editing, either to build a draft for later publication in the main encyclopedia, or just to practice formatting with wiki markup syntax. If you have an account, you will see a link in the upper right corner of the screen that says "Sandbox"; this will take you to your sandbox.

The link opens a user subpage Special:MyPage/sandbox. If the page does not exist then it is opened for editing with {{User sandbox}} added to the top of the editing window. The template notifies readers that the page is a sandbox, not an article, and it prevents the page from being indexed by search engines.

Moving an existing sandbox page

If you have an existing sandbox that is not named "sandbox", then you can move it. See Help:How to move a page.

Customizing

Removing

The sandbox link was previously a gadget but is now a built-in feature. It cannot be disabled in preferences but it can be removed by placing this in Template:Yourcss: <syntaxhighlight lang=css>li#pt-sandbox { display: none !important; }</syntaxhighlight>

The feature lacks feature-settings to support customization; however, it can be removed and a JavaScript version created in userspace.

Moving to toolbar

To create a toolbar link to Special:MyPage/sandbox.

<syntaxhighlight lang=javascript> mw.util.addPortletLink(

'p-personal',
'/w/index.php?title=Special:MyPage/sandbox&action=edit&preload=Template:User_sandbox/preload&editintro=Template:User_sandbox',
'My sandbox',
'pt-mysandbox',
'Go to your sandbox',
null,
'#pt-preferences'
);

</syntaxhighlight>

To remove autoedit: <syntaxhighlight lang=javascript> var NoEditSandbox = $('#pt-mysandbox a').slice(0,1).attr('href', '/wiki/User:' + wgUserName + '/sandbox'); </syntaxhighlight>

My subpages

If you have multiple sandboxes or other user subpages, it may be more useful to show a list of your subpages:

Ensure you replace username with your username.

<syntaxhighlight lang=javascript>

mw.util.addPortletLink(
'p-personal',
'/wiki/Special:PrefixIndex/User:username',
'My subpages',
'pt-mysubpages',
'Show my subpages',
null,
'#pt-preferences'
);

</syntaxhighlight>

Discussions

Proposals for My sandbox go back to at least 2008,[1] but the defining proposal was in December 2011.[2] A Gadget proposal in January 2012 resulted in the addition of My Sandbox.[3] The gadget was replaced by mw:Extension:SandboxLink in April 2015.[4]

See also

Notes

Template:Wikipedia help pages