NamespaceSyntax

From OOModels
Revision as of 08:10, 23 July 2008 by AndreasLeue (talk | contribs) (New page: {{HelpPagesHeaderBar}} All namespace pages share a common structure, as described here. The Metabox of items belonging to this namespace (like Artefacts and Types) rely in this structure....)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

All namespace pages share a common structure, as described here. The Metabox of items belonging to this namespace (like Artefacts and Types) rely in this structure.

Please note the difference between PackageSyntax:package pages and namespace pages. The former provide containers for artefacts, types and other wiki items. The latter describe the namespace itself and are included within the former.

Include/Noinclude[edit]

Be sure to put everything except a short description of your namespace in <noinclude>...</noinclude> tags. This is because everything else is included automatically in metaboxes of items belonging to your namespace. You may optionally include this short description in <includeonly>...</includeonly> tags, if you do not want to show that same short description on the regular page (maybe because there's the same, but longer description given).

Specifically put the metabox of your namespace page inside that noinclude tags, otherwise the depending pages become erraneous.

Metabox[edit]

Next part (besides the starting noinclude tag) of each namespace page is a socalled Metabox. It provides meta data of the namespace and is automatically nicely rendered. The Metabox is a self-describing wiki template (read more about the Metabox template).

The Metabox entry on your page might e.g. look like this:

{{Metabox
| Meta_Category = Type:org/oomodels/wiki/Namespace
}}

Arbitrary Text[edit]

You can add arbitrary text to a namespace page, as long as it does not look like the Metabox, and as long as the text outside the noinclude tags is not too long. Typically, you add a short description outside the noinclude tags and some more details inside.

Sub Namespaces[edit]

As on every PackageSyntax page, you should add a section called "Sub Namespaces" which contains a <SubPages/> tag. This tag automatically generates a list of all sub namespaces of your namespace. If you do so, users can browse into your namespace, which is very desirable.

Namespace Pages[edit]

Furthermore, you should include the {{NamespacePages}} template. This template automatically includes a list of all items that belong to your namespace. It also automatically adds a section heading, so there's no need to do so manually (in contrast, the SubPages tag does not add a heading, since it might be named differently depending on where the tag is used).

Category[edit]

Finally, if your namespace is a MainNamespace, you should add a respective [[Category:MainNamespace]] link.

Ancestors[edit]

Please make sure to add all ancestor namespace pages, too. Mediawiki does not automatically create such pages. If you want to make your namespace browsable, you have to add all ancestor pages manually. You might need to refresh the ancestor pages afterwards (clearing the cache, with help of the action purge), to allow the SubPages tag to create updated content.