# Managing pages

## Via Admin Console

1. Login at `/admin`
2. Go to **Content**
3. Choose a folder or create a new page
4. Edit content in the CodeMirror editor
5. Save with Ctrl+S

## Editor features

- **CodeMirror** editor with syntax highlighting (Markdown, PHP, HTML)
- **Toolbar** for quick Markdown insertion
- **Shortcuts**: Ctrl+S (save), Ctrl+N (new)
- **Auto-save** backups in `.bak/` folder

## Layout selection

On the content-edit page you can choose the layout from the layouts defined in `theme.json` (template mapping). The selected layout is stored in the frontmatter `layout:` key.

```markdown
---
layout: left_sidebar
---
```

Unknown layouts fall back to `config.default_template` from `theme.json`.

## Plugin selection and order

On the content-edit page you can choose content plugins for the sidebar:

- **Selection** — Only content plugins (from `plugin.json` with `type: "content"`) appear in the plugin selection
- **Order** — Adjust the order with up/down buttons
- **Frontmatter update** — The frontmatter `plugins:` key is updated live on changes
- **Layout without sidebar** — Plugins are hidden when the chosen layout has no sidebar (e.g. `full_content`)

```markdown
---
layout: left_sidebar
plugins:
  - HTMLBlock
  - Navigation
---
```

The order in the frontmatter determines the order of the plugins in the sidebar (top to bottom).