PHPackages                             bvdputte/kirby-vpkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bvdputte/kirby-vpkit

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

bvdputte/kirby-vpkit
====================

Virtual pages helper kit for multilingual Kirby 3

1.1.1(3y ago)911MITPHP

Since May 26Pushed 2y ago2 watchersCompare

[ Source](https://github.com/bvdputte/kirby-vpkit)[ Packagist](https://packagist.org/packages/bvdputte/kirby-vpkit)[ RSS](/packages/bvdputte-kirby-vpkit/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Virtual pages helper kit for multilingual Kirby 3
=================================================

[](#virtual-pages-helper-kit-for-multilingual-kirby-3)

Opinionated boilerplate helper to make it easier to work with [virtual pages](https://getkirby.com/docs/guide/virtual-pages) in a multilingual kirby 3 setup.

By default virtual pages in a multilingual Kirby environment require some additional, repetitive work. This plugin is an attempt to keep it DRY, and it also takes care of some other niceties such as caching to avoid hammering your backend.

Installation
------------

[](#installation)

- unzip [master.zip](https://github.com/bvdputte/kirby-vpkit/archive/master.zip) as folder `site/plugins/kirby-vpkit` or
- `git submodule add https://github.com/bvdputte/kirby-vpkit.git site/plugins/kirby-vpkit`
- `composer require bvdputte/kirby-vpkit`

Setup
-----

[](#setup)

1. Add a configuration array to your `config.php` that contains following keys:
    1. `fetch`: a closure (function) that returns an array as example below. This will be used to generate the virtual pages.
    2. `parentUid`: The ID of the parent page where the virtual pages will be put
    3. `template`: The template you want for the virtual pages
2. Create a [model](https://getkirby.com/docs/guide/templates/page-models) for `template` to `site/models` and reuse the `children()` method to return the virtual pages with this plugin's helper
3. Create a template that matches the given `template`-name to `site/templates`
4. Done. Kirby should now use your added virtual pages as regular pages.

This plugin expects a configuration that returns data in the following form to convert into "virtual Kirby pages", e.g.:

```
$virtualPages = [
    "en" => [
        [
            "id" => "some-uuid", // Will be used to figure out which translations belong to eachother
            "slug" => "slug-in-english",
            "content" => [
                "title" => "Title is required",
                "somefield" => "Other fields are added like this"
            ]
        ]
    ],
    "nl" => [
        [
            "id" => "some-uuid", // Will be used to figure out which translations belong to eachother
            "slug" => "slug-in-nederlands",
            "content" => [
                "title" => "Titel is verplicht",
                "somefield" => "Andere velden kunnen zo toegevoegd worden."
            ]
        ]
    ]
];
```

*Check the included `demo` folder in this repo for some examples.*

Caching
-------

[](#caching)

### Default

[](#default)

By default, each fetch is cached. This is so to avoid latency occuring when fetching data from the endpoint.
If you don't want this, you can opt out via `'bvdputte.kirby-vpkit.cache' => false` in `config.php`.

Each fetch will be cached by default for 1 minute.
You can change this with `'bvdputte.kirby-vpkit.cache.timeout' => 60` in `config.php` (The value is in minutes).

### Re-cache when backend is down

[](#re-cache-when-backend-is-down)

When cache is enabled, and your backend is down, this plugin will also continue to serve the already cached data instead of erroring. You can opt out this behaviour via `'bvdputte.kirby-vpkit.recache-on-fail' => false` in `config.php`.
The timeout for this cache is also 1 minute by default but can set via option: `'bvdputte.kirby-vpkit.recache-on-fail.timeout' => 30` in `config.php` (The value is also in minutes).

In this case, and if you have the [kirby-log plugin](https://github.com/bvdputte/kirby-log) installed, failed attempts will be logged.

### Combine with pages cache

[](#combine-with-pages-cache)

If you want to combine this with pages cache you'll need a strategy to invalidate the reinstantiate cache; a common strategy here is to use a worker via a cronjob. There's also a demo worker included in this repo. Or you could exclude your virtual pages from your page cache.

Caveats
-------

[](#caveats)

- Default language; the imported content must **at least exist in the default language of Kirby**.
- When using workers to flush the cache; you must set an `url`-key in `config.php`. Since caching is used, and caches are bound to the url, we have to explicitely add it to make the worker find it. Especially when that worker is envoked over CLI in a cronjob e.g.
- You cannot use the panel to manage these pages as they don't exist on the file system

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~160 days

Total

4

Last Release

1327d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49e16ff7562c3ee72cb4f1d3429460bf4ab0f3d00b9fcd0c5f6b2ae0504ab38b?d=identicon)[bvdputte](/maintainers/bvdputte)

---

Top Contributors

[![bvdputte](https://avatars.githubusercontent.com/u/490505?v=4)](https://github.com/bvdputte "bvdputte (21 commits)")

### Embed Badge

![Health badge](/badges/bvdputte-kirby-vpkit/health.svg)

```
[![Health](https://phpackages.com/badges/bvdputte-kirby-vpkit/health.svg)](https://phpackages.com/packages/bvdputte-kirby-vpkit)
```

###  Alternatives

[mzur/kirby-uniform

A versatile Kirby plugin to handle web form actions.

26068.3k13](/packages/mzur-kirby-uniform)[arnoson/kirby-vite

Vite helper for Kirby CMS

9759.2k3](/packages/arnoson-kirby-vite)[thathoff/kirby-git-content

Plugin to track changes to content in a git repository.

15343.7k](/packages/thathoff-kirby-git-content)[sylvainjule/locator

A map &amp; geolocation field, built on top of open-source services / Mapbox

11237.3k1](/packages/sylvainjule-locator)[tobimori/kirby-seo

The default choice for SEO on Kirby: Implement technical SEO &amp; Meta best practices with ease and provide an easy-to-use editor experience

10039.7k1](/packages/tobimori-kirby-seo)[fabianmichael/kirby-meta

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

6910.7k1](/packages/fabianmichael-kirby-meta)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
