Changing Categories

From Salish Sea Wiki

Also see Categorization System

With the development of structured data using Cargo as part of our Platform Architecture this increases the complexity of changing categorization. These guidelines are for administrators to share best practices.

Changing Category Hierarchy

Reorganizing categories within the Page Type Hierarchy (see Categories) only requires only that you change the categorization of the category namespace page. If you move a category into a different branch of the hierarchy you will need to change Cargo data using a sophisticated Replace Text operation (see below). Note that for easy for form development we have divided the Topic categories into two branches: Anthropogenic and Ecological topics.

Changing Category Name

Changing category name is an admin level action, and requires using Special:ReplaceText to complete universal text changes across the platform using regular expressions, or RegEx.

The first step is to replace the native category

Search string:
(?i)\[\[Category:OldName\]\]

Replacement string:
[[Category:NewName]]

The second step involves replacement of template data in the Cargo

This search string searches for pages containing a specific text, and then also including the category name.
(\|AnthroTopic=.*?)CategoryName

This replacement string retains the first string, and then replaces the second string with the proposed text:
\1NewCategoryName