KRayWiki:Examples
- See Also
- About KRayWiki
Contents
Instructions
- Examples are ideally written to allow source copy/paste without opening the editor on this page.
- Recognize that some complex examples may require an edit to see the wiki markup source.
- Reserve this page for:
- Commonly occurring markup that useful for maintaining consistency across the wiki.
- Markup that is difficult to create using only the available off-site help.
Examples
Back Links and Cross-references
A basic example:
; See Also : [[Main Page]]<br />
A more complex example showing several related resources and a more descriptive link:
; See Also : [[CSDI_Wiki:MediaWiki|CSDI MediaWiki Information and Help Index]] : [[Main Page]]<br />
- Note
- It is a best practice to avoid gratuitous linking of pages that appear in either the sidebar or page body.
- Note
- Previous recommended placement of <br/> was below the last line, but now, perhaps due to a software upgrade, it appears that this causes an overlarge vertical gap. Current recommended placement is appended to the final line (for aesthetics and efficient use of space).
Category Page Links
[[Category:Software Resources]]
Font Color
- Set the font color inside a styled tag.
<span style="color: purple;">font color</span>
Redirects
- A redirect allows more than one possible wiki path to reference the same information. For example, the following redirect could transfer someone from CC Office to Corpus Christi Office if it was saved on a page named CC Office since the term CC is a convenient shortcut.
#REDIRECT [[Corpus Christi Office]]Preformatted Text Box
- <pre> tags do not behave as expected when used inside a wiki page. This work-around behaves more like an HTML tag would work.
- Adjust margin: 1em 2em; to set indent level for the box. The 2em corresponds to one : indent.
- Adjust margin: 1em 2em; sets the vertical spacing around the box.
<div style="background-color: #EEEEEE; border: dashed; border-width: 1px; font-family: courier; margin: 1em 2em; padding: 1ex; white-space: pre;"><nowiki>
</nowiki></div>Common Unicode Constructs
See Also:
- A searchable Unicode character table
Structures used to render software user interface controls:
- Checkboxes
[✓]
Checked[ ]
Unchecked <code>[✓]</code> <code>[ ]</code>- Small Triangles
- ▸ Black Right-Pointing Small Triangle
- ▾ Black Down-Pointing Small Triangle
▸ ▾- Modifier Letter Arrowheads
- ˂, or, <
- ˃, or, >
- ˄ ˅
<small>'''˂'''</small>, or, <small>'''<'''</small> <small>'''˃'''</small>, or, <small>'''>'''</small> ˄ ˅
Site Templates
An exhaustive listing of local templates is here.
A listing of currently unused templates may be viewed here.
Page Header Templates
Place the indicated markup at the top of a page to insert pre-defined page headers.
Policy
{{Template:Policy}}Proprietary
{{Template:Proprietary}}Restricted
{{Template:Restricted}}WIP
{{Template:WIP}}Server Templates
Prefer not to refer to server host names, IP address, URLs, etc. Instead, use a logical names like:
- {{Template:Server}}
- Unadorned logical name template references should expand to a descriptive server name, or host name.
Append a standard suffix to the logical name template to make it easy remember how to reference the server in other ways:
- {{Template:ServerIP}}
- Server IP address
- {{Template:ServerURL}}
- Server web link text (i.e. http://...)
- {{Template:ServerFileURL}}
- Server file share root reference (i.e. file://...)
By following these conventions, it becomes trivial to change all server references everywhere in the wiki at once with a single edit of affected template pages. When templates are designed well, changes can automatically cascade into related templates without additional edits. For example, consider that a template may itself refer to another template:
If, for example,
- {{Template:CompanyInetDomain}}
- expands to:
Other templates could be written to re-use the base name :
- {{Template:CompanyWebsiteURL}}
- is defined as:
- {{Template:LmnWebsiteURL}}
- is defined as:
- {{Template:CompanyWebsiteURL}}/SDwp/lmn
- expands to:
- {{ManWebsiteURL}}
- is defined as:
- {{CompanyWebsiteURL}}/SDwp/
- expands to:
In such a set of templates, any change the Domain template trickles down into each subordinate template that references it, whether directly, or indirectly.