Move pages plugin | Click to Next

Missing move pages feature for Kirby 3

Download

Kirby Move Pages

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

Installation

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

Usage

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

Query language

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

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

Templates

# /site/blueprints/pages/portfolio.yml
title: Portfolio

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

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

options:
  move:
    - category

Or you can use query language:

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

options:
  move: kirby.page('shop').children
2 Likes

v2.0.1

  • Updated German translations
  • Updated readme

@clicktonext Superb plugin. Couple of thoughts:

Your license on the website states:

You cannot: […] Sell it as a product on any marketplaces as your own

Yet, the license you add along the code is MIT. And basically all (officially OSI approved) open-source licenses, including MIT, allow selling the code, even it’s someone else’s code (according to the attribution rules of the license itself). The MIT license also allows me to take the code of yours and publish it to GitHub.

I thought there might be a reason I can only download the plugin from your website and was surprised it comes with an MIT license. You might want to remove the MIT license if you want to make sure nobody is using your code on a marketplace, and put your own license text into the LICENSE file.

Secondly, do you have any plans to make it installable via composer?

1 Like

We are aware that we have shortcomings in licensing. We will improve. Thanks for feedback :+1:

Since it is in private repository on GitHub, we can only resolve the issue with the purchasing customers by granting access to that repository.

Found this tool by coincidence and remembered this conversation. Maybe this would be worth a look?

1 Like

Great plugin. Is there any hook available?

1 Like

Thanks for great idea! Let me try to implement…

1 Like

I’ve published new release with new two hooks. New plugin post created since the plugin supported by owebstudio: Move Pages Plugin