Redigerer
Mal:If pagename/dok
(avsnitt)
Hopp til navigering
Hopp til søk
Advarsel:
Du er ikke innlogget. IP-adressen din vil bli vist offentlig om du redigerer. Hvis du
logger inn
eller
oppretter en konto
vil redigeringene dine tilskrives brukernavnet ditt, og du vil få flere andre fordeler.
Antispamsjekk.
Ikke
fyll inn dette feltet!
=== Usage === This template takes one or more parameters. Most of the parameters don't have fixed names, instead they are part of the pattern matching. Like this: <pre> {{if pagename | /doc = Doc page text | other = Other pages text }} </pre> If the template is on "Template:Example/doc" the code above will return this: :{{if pagename | /doc = Doc page text | other = Other pages text | page = Template:Example/doc }} If the template is on any ''other'' page than a /doc page it will return this: :{{if pagename | /doc = Doc page text | other = Other pages text | page = Template:Example }} Here is a description of the full pattern matching: <pre> {{if pagename <!-- Match on full pagename --> | User:Example/test = Text for "User:Example/test". | User:Example = Text for "User:Example". | User talk:Example = Text for "User talk:Example". <!-- Match on full basepage name, when on a basepage or its subpages --> | User:Example/+ = Matches "User:Example" and "User:Example/test". <!-- Match on pagename, when on a basepage --> | Example = Matches "User:Example", "User talk:Example", "Template:Example" and so on, but not "User:Example/something". <!-- Match on full basepage name, when on a subpage --> | User:Example/* = Matches "User:Example/something", but not "User:Example". | User talk:Example/* = Matches "User talk:Example/something". <!-- Match on basepage name, when on a subpage --> | Example/* = Matches "User:Example/something" and "User talk:Example/something". <!-- Match on subpage name --> | /something = Any pagename that ends in "/something". | /doc = Any pagename that ends in "/doc". <!-- Match on partial subpage name (case-insensitive) --> | /some* = Any subpage name beginning with "/some" or "/Some". | /arch* = Matches "User talk:Example/Archive 1". <!-- Default fallbacks --> | basepage = Text for any basepage. | subpage = Text for any subpage. | other = Text for any page. }} </pre> The matching goes from top to bottom, and returns the first parameter that matches. "''Top to bottom''" means the order shown above, not the order you happen to feed the parameters. There's no limit to the number of parameters that you can use, other than what the servers and MediaWiki system can handle. Most of the matching is case-sensitive. For instance "<code>/test</code>" matches "User:Example/test" but not "User:Example/Test". Matching on partial subpage names such as "<code>/some*</code>" has some limitations, see [[#Partial subpage names|its own section]] below. If an empty (but defined) parameter matches, the matching stops and the template returns an empty string. That's on purpose and can be used like this: <pre> {{if pagename | /doc = | /sandbox = Sandbox text | other = Other pages text }} </pre> The code above will render nothing when on a /doc page. But when on a /sandbox page it will return this: :{{if pagename | /doc = | /sandbox = Sandbox text | other = Other pages text | page = Template:Example/sandbox }} And when on any other page it will return this: :{{if pagename | /doc = | /sandbox = Sandbox text | other = Other pages text | page = Template:Example }}
Redigeringsforklaring:
Merk at alle bidrag til Wikisida.no anses som frigitt under Creative Commons Navngivelse-DelPåSammeVilkår (se
Wikisida.no:Opphavsrett
for detaljer). Om du ikke vil at ditt materiale skal kunne redigeres og distribueres fritt må du ikke lagre det her.
Du lover oss også at du har skrevet teksten selv, eller kopiert den fra en kilde i offentlig eie eller en annen fri ressurs.
Ikke lagre opphavsrettsbeskyttet materiale uten tillatelse!
Avbryt
Redigeringshjelp
(åpnes i et nytt vindu)
Forhåndsvis en side som bruker denne malen
Denne siden er medlem av 1 skjult kategori:
Kategori:Sider hvor ekspansjonsdybden er overskredet
Navigasjonsmeny
Personlige verktøy
Ikke logget inn
Brukerdiskusjon
Bidrag
Opprett konto
Logg inn
Navnerom
Mal
Diskusjon
norsk bokmål
Visninger
Les
Rediger kilde
Vis historikk
Mer
Navigasjon
Forside
Siste endringer
Tilfeldig side
Hjelp til MediaWiki
Verktøy
Lenker hit
Relaterte endringer
Spesialsider
Sideinformasjon