ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Sidebar

From ModEnc
Revision as of 17:21, 3 February 2007 by Renegade (talk | contribs) (Unified sidebar wrapper)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Sidebar
Sidebar/Default
This template serves as a unified wrapper for sidebars with a headline; see Template:Box for one without a headline. The purpose of this template is to unify the appearence of sidebars used on ModEnc, into which only the content is individually loaded. This way, the appearence of all sidebars can be changed quickly by either changing this template directly, or changing the CSS is calls.

Usage:

{{Sidebar|width=|float=|title=|content=}}
  • width specifies the width of the sidebar - accepts both percentages and pixel lengths. Defaults to 20%.
  • float specifies whether the bar should float left or right of the text, or not at all (none). Defaults to right.
  • title specifies the headline at the top of the sidebar. Defaults to the name of the page it is included into.
  • content specifies the name of the page that provides the content of the sidebar. The name has to include the target page's namespace. At best, make the content page a sub-page of ModEnc:Sidebars. The default content is saved at Template:Sidebar/Default.

Example

{{Sidebar|width=20%|float=right|title={{PAGENAME}}|content=Sidebar/Default}}
Is the code of the sidebar to the right. It only repeats the default values, so it is equal to just writing {{Sidebar}}. (Note that "Template:" of content is omitted because inclusion calls go to the template namespace by default.)

Notes

  • There are several pre-made Sidebars for situations like mod or tool information. Check ModEnc:Sidebars before you create a new one.
  • If you do create a new sidebar, do not copy this code. Instead, nest templates. Have your template call this template with another template call in the content area.