# CatMenu

[🇫🇷 Français](README) | 🇬🇧 English | [🇩🇪 Deutsch](README_DE) | [🇪🇸 Español](README_ES)

`catmenu` displays a tree menu (pages + subfolders) for a DokuWiki namespace.

## Syntax

```text
{{catmenu>namespace}}
```

Examples:

```text
{{catmenu>.}}
{{catmenu>wiki}}
{{catmenu>docs:project}}
```

- `.`: uses the current namespace.
- `namespace`: uses the specified namespace.

## Behavior

- lists pages and subfolders readable by the current user.
- automatically opens the branch matching the current page.
- handles namespace start pages (`$conf['start']`).
- hides pages without an H1 title when `skip_page_without_title` is enabled.

## Configuration

In the Configuration Manager:

- `skip_file`: regex used to ignore matching page IDs. Also accepts the special value `@hidepages` to automatically reuse DokuWiki's built-in `hidepages` setting.
- `skip_page_without_title`: ignore pages without H1.
- `show_in_editor_menu`: show the insert button in the editor.
- `context_menu_items`: checkboxes to choose which actions appear in the right-click context menu. All enabled by default.
- `footer_content`: multiline DokuWiki markup injected at the bottom of every menu (links, notes, etc.). Empty by default.

## Compatibility

- Compatible with [ProseMirror](https://www.dokuwiki.org/plugin:prosemirror).
- `catmenu` uses [pagesicon](https://www.dokuwiki.org/plugin:pagesicon) to display icons when available. The "Manage icon" context menu action only appears if pagesicon is installed.
- Compatible with the `newpagefill` plugin for page creation. When available, `catmenu` uses its creation helper.

## Context Menu

Right-click on an item (each action is individually configurable):

- create a new page (depending on permissions),
- reload cache (`purge=true`),
- open the media manager,
- open icon management (`pagesicon`) when available,
- copy the URL.

## Permissions

Rendering follows DokuWiki ACL rules:

- read permission is required to show an item,
- context actions are limited by permissions (create/edit/upload).
