Template:Infobox legislation/images/doc

From Chalo Chatu, Zambia online encyclopedia
Revision as of 09:57, 1 September 2025 by Chalochatu (talk | contribs) (Created page with "{{Documentation subpage}} == Purpose == This subtemplate of {{tl|Infobox legislation}} is used to centralize and manage the small icons or images that appear in the main infobox. It standardizes the icons for consistency and makes maintenance easier. == Usage == You do not call this template directly. It is automatically invoked by {{tl|Infobox legislation}} when an image parameter is requested. Example from the main infobox: <syntaxhighlight lang="wikitext"> {{In...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
This is a documentation subpage for Template:Infobox legislation/images.
It contains usage information, categories and other content that is not part of the original template page.

Purpose

This subtemplate of {{Infobox legislation}} is used to centralize and manage the small icons or images that appear in the main infobox. It standardizes the icons for consistency and makes maintenance easier.

Usage

You do not call this template directly. It is automatically invoked by {{Infobox legislation}} when an image parameter is requested.

Example from the main infobox:

{{Infobox legislation
 | short_title   = Example Act, 2025
 | image         = {{Infobox legislation/images|parliament}}
 | long_title    = An Act to provide for...
 | enacted_by    = National Assembly of Zambia
 | date_enacted  = 1 September 2025
}}

Parameters

This template accepts a keyword that matches the type of icon needed:

  • parliament – Parliament building icon
  • book – Open book icon
  • scroll – Legal scroll icon
  • constitution – Constitution icon
  • law – Generic law symbol

(Extend this list as needed by adding cases in the template.)

How it works

The template uses a simple switch function in wikitext or Lua to map keywords (e.g., parliament) to specific image files stored on Commons or Chalo Chatu’s file system.

See also