Teamplaid:Ns0

Gàidhlig editions of Wiki, an online encyclopedia


Documentation icon Sgrìobhainnean teamplaid[view] [deasaich] [history] [purge]

This is the {{main other}} meta-template.

This template helps other templates detect if they are on a main space (article) page or some "other" type of page.

Basic usage

This template usually takes two parameters, like this:

{{main other | Article text | Other pages text }}

If the template is on a main space (article) page, it will return this:

    Article text

If the template is on any other page, it will return this:

    Other pages text

A typical usage case could be to make it so that a template only adds a category when on an article. Thus not adding other pages that just show the template. Like this:

{{main other | [[Roinn-seòrsa:Some article maintenance category]] }}

Or to warn that a template should not be used on other pages:

{{main other | | This template should only be used in articles. }}

Note that in the first case above the "other" parameter was not used, and in the second example the "main" parameter was left empty.

Demospace

For testing and demonstration purposes this template can take a parameter named demospace.

  • If it has the value main it returns the article text.
  • It if has the value other or any other value such as the name of some other namespace it returns the other pages text.
  • If the parameter is empty or undefined, the actual page type determines the result.

Like this:

{{main other | Article text | Other pages text | demospace = main}}

No matter on what kind of page the code above is used it will return this:

    Article text

You can make it so your template also understands the demospace parameter. That means you can demonstrate the different appearances of your template in the documentation for your template. Then do like this:

{{main other | Article text | Other pages text | demospace = {{{demospace|}}}}}

Technical details

This template detects article "Talk:" pages as type other.

This template works like {{main talk other}}, for more examples and technical details see full documentation there.

See also

Teamplaid:Namespace detect see also

#Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. Wiki (Study in China) is an independent company and has no affiliation with Wikimedia Foundation.
This article uses material from the Wikipedia article Teamplaid:Ns0, which is released under the Creative Commons Attribution-ShareAlike 3.0 license ("CC BY-SA 3.0"); additional terms may apply. (view authors). Tha an t-susbaint seo ri fhaighinn fo CC BY-SA 3.0 mur eil an caochladh 'ga innse. Images, videos and audio are available under their respective licenses.

🔥 Top trends keywords Gàidhlig Wiki:

Carles Puigdemont i CasamajóPrìomh-DhuilleagAlfred WernerAmy WinehouseEadar-theangairBaisteachOilthigh YaleIolraCreideamhGrianArnold SchwarzeneggerBathar-cruaidhBBC a h-aonDràmaCruinneLeas-abhainnMòr-roinnMarilyn MonroeNeach-tasgaidhRoald AmundsenQuébecLeonardo da VinciRihannaCobhair:SusbaintMartin LutherFaidhle:Free-Fire-Accounts.jpgUicipeid:General disclaimerUicipeid:Doras na coimhearsnachdSònraichte:SearchAlfred NobelUicipeid:Ro-ràdhUicipeidUicipeid:Talla a' BhaileGàidhligSònraichte:RecentChangesFaidhle:James Cook Signature.svgNirribhidhAlexander StewartUicipeid:Cùisean an lathaJeane FreemanInnleadaireachdAn FhraingAn Cogadh MòrBhatarsaighMartin HeideggerLios Mór (Èirinn)An Rìoghachd AonaichteIain Mac a' GhobhainnLaideannCobhair:FòrmatadhDòmhnall Mac Fhionnlaigh nan DànAn Ruis11 an t-SultainCobhair:CleachdadhMatamataigGearmailtisSònraichte:MyContributionsRoinn-seòrsa:BunaiteachRoinn-seòrsa:CobhairCobhair:DeasaichEachdraidhGàidhlig na h-ÈireannCobhair:Duilleagan DeasbaireachdUicipeid:Tigh-cluicheCobhair:Cruthaich cunntasMòideal:CoordinatesSònraichte:MyTalkLiosta nam beathachSluagh-phoblachd na SìneMartin Luther King, Jr.An ÈipheitFaidhle:TUT-Ausstellung FFM 2012 47 (7117819557).jpgNa Stàitean AonaichteAn t-SeicFraingisAlexander BurnettCobhair:Puingean cudromachAn SaoghalBrabhsair-lìn🡆 More