Move Pages Plugin

Move Pages Plugin

Missing move pages feature for Kirby 3. You can move the pages under the parent pages you specify with this plugin.


  1. Download the latest release
  2. Unzip downloaded file
  3. Copy/paste unzipped folder in your /site/plugins folder


Don’t forget! To move a page under the another page, the parent page must support the page template you are moving. This option must be a query language string or an array of templates and must be a collection of pages, not a single page.


Simply specify under which parent templates a page can be moved.

# /site/blueprints/pages/project.yml
title: Project

    # parent page templates where you can move this page
        - projects
        - portfolio

Query language

If you need a more complex logic or dynamic parent templates, you can use the query language.

# /site/blueprints/pages/project.yml
title: Project

    # parent pages collection where you can move this page
    move: site.children.filterBy('template', 'in', ['projects', 'portfolio'])


Available hooks for this plugin: page.move:before and page.move:after.

// /site/config/config.php
return [
    'hooks' => [
        'page.move:before' => function (Kirby\Cms\Page $page, ?Kirby\Cms\Page $parent = null) {
            // your code goes here
        'page.move:after' => function (Kirby\Cms\Page $newPage, Kirby\Cms\Page $oldPage, ?Kirby\Cms\Page $parent = null) {
            // your code goes here

Sample use case: shop

For example, let’s assume that there is a multi-category structure on a shop site. You want to move a product to another category.

Content directory

  • /home
  • /about
  • /shop
    • /category-a
      • Product A
    • /category-b
      • Product B
    • /category-c
      • Product C
  • /contact

You can set move option with category template:

# /site/blueprints/pages/product.yml
title: Product item

        - category

Or you can use query language:

# /site/blueprints/pages/product.yml
title: Product item


Version 2.1.0

:tada: Features

  • Added new hooks for the plugin: page.move:before and page.move:after.
1 Like

Love the hooks feature! :slight_smile:

Version 2.2.0

:sparkles: Enhancements

  • Supports moving pages to or from to root (site blueprint)

:bug: Fixes

  • Fixed moving top root pages that have no parent

:warning: Breaking Changes

  • parent hook argument can be null (nullable) when page model have no parent

Newbie question : how to handle a case where the catalog have multiple categories > sub categories > sub sub categories ? Currently the plugin only scan children at one level deep.

The plugin;

  • If you define pages templates it will scan the whole site.
  • If you define a query, it will only return the response of your query.

Please let me know your use case to help you.

Given the following document tree,

        Product A
            Product PAA
                Product PAAA
        Product B
            Product BB
        Product C

How to allow page Product C to be moved in the same category as product PAA ?

As far I understand your use case, you can try like following. Just add your category blueprint name into your product blueprint options.

# /site/blueprints/pages/product.yml
title: Product

    # parent page templates where you can move this page
        - category

Thanks for your help. Setting the move options to the template name did the trick.