remove_section

SolidGroundUX DocumentationSolidGroundUX
NL

fn: remove_section

Purpose

Apply an explicitly chosen section removal policy.

Signature

def remove_section(source, section, mode, destination='', archive_root=''):

'move' transfers children (including subordinate section trees) to an existing indexed destination, then removes the selected section indexes. 'archive' moves the complete section tree outside the live content tree. 'delete' permanently removes the complete tree. Nothing edits inbound URLs.

Usage

# Archive an entire section outside the live content directory.
remove_section(source, "news", mode="archive", archive_root="/srv/backups/sections")
# Permanent deletion is a separate, destructive operation.
remove_section(source, "news", mode="delete")