directus-extension-item-navigation
v1.0.1
Published
Prev/Next navigation buttons for Directus item edit pages with position counter
Maintainers
Readme
Item Navigation for Directus
Navigate between items without leaving the edit page. Adds Prev/Next buttons with position counter to any collection.
Features
- Quick navigation — Jump to previous/next item with one click
- Position counter — See where you are:
5 / 42 - Smart sorting — Auto-detects
sortfield or uses primary key - Configurable — Custom sort field and direction
- Bilingual — English and Russian labels
- Themed — Matches your Directus color scheme
Installation
Via Directus Marketplace
- Go to Settings → Extensions
- Search for "Item Navigation"
- Click Install
Manual Installation
npm install directus-extension-item-navigationOr copy the dist folder to your Directus extensions directory:
extensions/directus-extension-item-navigation/
├── dist/
│ └── index.js
└── package.jsonRestart Directus after installation.
Usage
- Open any collection settings
- Create a new field:
- Type: Alias (Presentation)
- Interface: Item Navigation
- Configure options (optional):
- Sort Field — Field to determine order (default:
sortorid) - Sort Direction — Ascending or Descending
- Show Labels — Display "Prev/Next" text
- Sort Field — Field to determine order (default:
- Position the field at the top of your form
Screenshots
Navigation Buttons
┌─────────────────────────────────────────┐
│ [< Prev] 5 / 42 [Next >] │
├─────────────────────────────────────────┤
│ │
│ Title: My Article │
│ Status: Published │
│ ... │
└─────────────────────────────────────────┘Interface Options
| Option | Description | Default |
|--------|-------------|---------|
| Sort Field | Field used for ordering items | Auto-detect |
| Sort Direction | asc or desc | Ascending |
| Show Labels | Display text on buttons | Yes |
How It Works
The extension queries the Directus API to find adjacent items based on the sort field value:
- Fetches current item's sort value
- Finds item with next lower value (previous)
- Finds item with next higher value (next)
- Counts items before current for position
Navigation uses Vue Router for seamless page transitions.
Compatibility
- Directus 10.10.0 and higher
- Directus 11.x
License
MIT License — feel free to use in personal and commercial projects.
Author
Miša — GitHub
Contributing
Issues and pull requests are welcome!
- Fork the repository
- Create your feature branch
- Make your changes
- Submit a pull request
