@webx-ui/module-pages

Pages for the WebX UI admin panel: the tree of a site's pages, their addresses, and the section that edits them.
7,462
Install
npm install @webx-ui/module-pages
Latest Version:0.6.3
Vue:3
License:MIT
Last Updated:Oct 21, 2026
Links: GitHub  ·  npm
Maintainer: ahabzig

@webx-ui/module-pages

The front end of the pages section of the WebX UI admin panel: the site's pages as a tree, their addresses, and the dialogs that create and move them.

The other half is the Composer package webx-ui/module-pages, which owns the tree, the addresses and the API. A section appears in the panel when both halves are installed.

Install

npm install @webx-ui/module-pages
import { createAdmin } from '@webx-ui/module-admin'
import { pages } from '@webx-ui/module-pages'
import '@webx-ui/module-pages/style.css'

createAdmin({
  basePath: '/cms',
  modules: [pages()],
}).mount()

pages({ path: '/content' }) puts the section somewhere else inside the panel.

The list

One level of the tree at a time. The home page is pinned at the top and its children are the level below it: every page of the site is inside the home page, so drawing it as a branch would give every row a step of indentation that says nothing.

  • Children arrive when a branch is opened — a catalogue of a few hundred pages is never fetched whole.
  • Searching puts the tree away and answers with a flat list of matches, each with its address: a branch drawn for the sake of one match deep inside it tells the reader nothing.
  • The bin is a filter, not a section. It lists the pages somebody deleted; whatever went down with a page comes back with it.
  • Two ways to move a page: drag it, or use “Move…” and pick the page it goes inside — which is the one that works on a touch screen and in a big catalogue.

Moving a page rewrites every address under it and leaves a redirect on each of the old ones, and the section says so out loud: an editor should not learn about a thousand redirects from a search engine.

The API

createPagesApi(context) is the same set of calls the screen makes, for a panel that wants to do something else with them:

const api = createPagesApi(useAdmin())

await api.list({ parent: 12 })
await api.create({ title: 'About us', parent_id: 1 })
await api.move(12, 1, 'inside')
await api.remove(12) // to the bin, with the branch under it

Licence

MIT

Related Packages

@webx-ui/module-blog

Blog for the WebX UI admin panel: articles made of blocks, rubrics and tags, sch...

6,583 0
@webx-ui/module-services

Services for the WebX UI admin panel: a catalogue of services made of blocks, fl...

4,031 0
@webx-ui/module-menu

Menus for the WebX UI admin panel: named menus, a tree of items, and what each o...

3,844 0
@webx-ui/module-faq

FAQ for the WebX UI admin panel: questions and answers with flat categories, ord...

3,160 0
@webx-ui/module-recipes

Recipes for the WebX UI admin panel: a gallery, ingredients, method and nutritio...

3,094 0

Version History

Version Released License
0.6.3 MIT
0.6.2 MIT
0.6.1 MIT
0.6.0 MIT
0.5.7 MIT