Formula:Si in prospectu
Haec formula sive transcludi ( |
This is a template that helps other templates determine if they are being previewed or not, and do or display different things accordingly.
De usu
[fontem recensere]{{Si in prospectu|value if being previewed|value if not being previewed}}
The first parameter is returned if the page is being previewed, otherwise the second parameter will be returned. Either parameter may be empty.
Examples
[fontem recensere]Preview this page to see the effect of previewing on the 'Example' column.
Code | Value when previewed | Value when saved | Example |
---|---|---|---|
{{Si in prospectu|Yes|No}}
|
Yes | No | No |
{{Si in prospectu|Red}}
|
Red | ||
{{Si in prospectu||Blue}}
|
Blue | Blue |
Vide quoque
[fontem recensere]- {{In harenario aut alibi}} — Distinguishes between the /sandbox subpages and the root template page and other subpages.
- {{In periclitationibus aut alibi}} — Distinguishes between the /testcases subpages and the root template page and other subpages.
- {{In formula aut alibi}} — Distinguishes between pages in the template namespace and other namespaces.
- {{Si in pagina basilari}} — Distinguishes between the root template page and subpages, without special consideration in the mainspace.
- {{Si in prospectu}} — Distinguishes between the previewed page and the saved page
- {{In subpagina aut alibi}} — Distinguisheds between the root page and subpages (any subpage), classifying pagenames in the mainspace with a slash as being the root page.
Documentatio pristina transclusa est ex Formula:Si in prospectu/doc. (recense | historiam inspice)
Quaesumus auctores experturos esse in harenarii (crea | effinge) ac periclitationum (crea) subpaginis huius formulae.
Lubet categorias et nexus in /doc subpaginam addere. Vide etiam subpaginas huius formulae.