Semi-Dynamic Content by Database and File System?

Ahoi,
I am still very new to Kirby AND to PhP as well but I love working with Kirby more and more.
The next Task is going to be as followed:

We have a Database on another Server and a Kirby on our Server. And I want to connect both -> When I create a Subpage and fill the “id Field” in the panel with a ID that exists in the Database I want some given content to be rendered from DB and some content to be rendered from Panel via Blueprint…

I just want to know if that is possible. I have seen the “virtual pages from database” tutorial, but that is not exactly what I am looking for, because I want to have the power over the subpage creation. That should not happen dynamically.

Please don’t spoiler too much, because I want to learn a lot from this project. All I want is to get a hint if it is possible.

-> As described I think about adding a field which takes the id from the row of the database and then I extend the pagemodel that if the “$id” === “$database.id”, the content should be filled from that row… :smiley:

Thanks for your time and your hints.
Have a nice evening. :slight_smile:

You might want to have a look at the guide about combining local content (i.e. Kirby pages) with content from other sources: https://getkirby.com/docs/guide/virtual-pages/merging-virtual-and-local-content

So, yes, this is possible.

1 Like