Template:Library classification navigation

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]

This template provides a structured display of library classifications for book categories. It helps users navigate through classification systems, displaying relevant classifications and categories according to the template title based on the structure defined in JSON data files.

Usage[edit]

To utilize this template, add the following code to the relevant Wikimedia Commons category pages:

{{Library classification navigation}}

This template will automatically recognize the classification system and ID based on title (Category:<classification system> <ID> <title>) and display pertinent information.

Configuration[edit]

For each new classification system, ensure the following JSON data files are available and properly configured:

  • StructureTable.json: The structure of IDs for a classification system.
  • CategoryTitleTable.json: ID and category title links.
  • DisplayNameTable.json: ID and display names in different languages.

These files should be stored in the module path corresponding to the classification system. For example, for the NDC10 classification, JSON files should be located in the "Module:Library classification navigation/NDC10/" directory. Current JSON files are available at Special:PrefixIndex/Module:Library classification navigation.

Example[edit]

For a category named "Category:NDC10 912 Drama," the template will recognize the "NDC10" classification, recognize ID "912", load the necessary tables, and display relevant classification information.