KRayWiki:Examples

From KRayWiki
Revision as of 09:57, 2 January 2018 by Krb (talk | contribs) (Initial copy from wIP CSDI_Wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
See Also 
About KRayWiki


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 : [[kraywiki:MediaWiki|This 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.

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>

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}}

Template:Policy

Proprietary

{{Template:Proprietary}}

Template:Proprietary

Restricted

{{Template: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:
Template:CompanyInetDomain

Other templates could be written to re-use the base name :

{{Template:CompanyWebsiteURL}} 
is defined as:
Template:URLProtocolTemplate:CompanyInetDomain
expands to:
Template:CompanyWebsiteURL
{{Template:LmnWebsiteURL}} 
is defined as:
{{Template:CompanyWebsiteURL}}/SDwp/lmn
expands to:
Template:LmnWebsiteURL
{{ManWebsiteURL}} 
is defined as:
{{CompanyWebsiteURL}}/SDwp/
expands to:
Template:ManWebsiteURL

In such a set of templates, any change the Domain template trickles down into each subordinate template that references it, whether directly, or indirectly.

Template:WIP