Doc: Templates: Difference between revisions

From Memento Database Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{Stamp|2023-08-02|5.0.6 beta|}}
{{Stamp|2023-08-02|5.0.6 beta|}}
{{BannerMenu}}
{{BannerMenu}}
{{PageTitle| Use of wiki templates in the Memento wiki}}
{{PageTitle|Use of wiki templates in the Memento wiki}}
MediaWiki templates are used in the Memento wiki for 3 reasons.
MediaWiki templates are used in the Memento wiki for 3 reasons.
# Once you become familiar with a template, it will generally make its job extremely easy as compared to entering the text again on every page.
# Once you become familiar with a template, it will generally make its job extremely easy as compared to entering the text again on every page.
Line 17: Line 17:
=== Banner menus & submenus ===
=== Banner menus & submenus ===


X
Wiki pages now contain a standard banner menu at the top of every page for quick navigation to sections of the Main page and to sections within the navigation index for those who already know where they want to go without having to scroll to it. There could be drop-down submenus to get to further detail within each link in the banner menu. This was just starting to be implemented when I started to flake out. Whether to continue to provide then and how do to do it is for discussion among the team.
 
;BannerMenu: a simple template without any parameters to show the banner menu at this spot in the wiki.
 
;BannerMenuAbout: Submenu for About topics. No parameters.
 
;BannerMenuGettingStarted: Submenu for Getting Started topics. No parameters.
 
;BannerMenuIndices: Submenu for direct access to index topics. No parameters or could have a parameter for the topic to access.
 
;BannerMenuSupport: Submenu for Support topics. No parameters.
 
 
=== Notes ===
 
;BeginNote: Start a multi-line note. Works with EndNote. No parameters.
:; Argument 1: The beginning portion of the note.
 
;EndNote: Terminate a multi-line note. Works with BeginNote. No parameters.

Revision as of 19:25, 14 August 2023

« Page as of 2023-08-02, editions Mobile 5.0.6 beta, Desktop »

Wiki
Home
About
Wiki | Memento
Getting started
Wiki | Memento
Indexes
Mobile | Desktop | Scripting
Support
Wiki | Memento
Use of wiki templates in the Memento wiki

MediaWiki templates are used in the Memento wiki for 3 reasons.

  1. Once you become familiar with a template, it will generally make its job extremely easy as compared to entering the text again on every page.
  2. Whenever a change to a template's standardized text is required, the change can be made once in the template, and all wiki pages that use the template will automatically be used from then on.
  3. The job of a template is to include standardized test into a wiki page. This standardization keeps the wiki consistent and correct.

Some templates are merely standard boilerplate and are the same every time they are used. An example of this is BannerMenu. The banner menu is the banner menu. There are no options or parameters.

Other templates may consist of standard text that has the ability for the page author to provide one or more parameters that enable different pages to include the same standard text except for substitution of the parameter(s). An example is PageTitle, which provides for 1 parameter, which is the title of the page. Using the template allows the positioning and the formatting of the title text to be standardized, while allowing the page author the ability to name each page according to its content.

(Note that the name by which the page is called in the wiki is one thing (like Spec: Integer field), whereas the page title is the text to be displayed at the top of the page, which will generally differ to some degree (like The Integer field type).)

See WikiMedia Templates Help for instruction regarding templates.

Wiki pages now contain a standard banner menu at the top of every page for quick navigation to sections of the Main page and to sections within the navigation index for those who already know where they want to go without having to scroll to it. There could be drop-down submenus to get to further detail within each link in the banner menu. This was just starting to be implemented when I started to flake out. Whether to continue to provide then and how do to do it is for discussion among the team.

BannerMenu
a simple template without any parameters to show the banner menu at this spot in the wiki.
BannerMenuAbout
Submenu for About topics. No parameters.
BannerMenuGettingStarted
Submenu for Getting Started topics. No parameters.
BannerMenuIndices
Submenu for direct access to index topics. No parameters or could have a parameter for the topic to access.
BannerMenuSupport
Submenu for Support topics. No parameters.


Notes

BeginNote
Start a multi-line note. Works with EndNote. No parameters.
Argument 1
The beginning portion of the note.
EndNote
Terminate a multi-line note. Works with BeginNote. No parameters.