Get content from another pages block

Hey there.

I would like to get content from another pages block.
So I have a page with blocks. In those Blocks I have an image and a title.
On another page I would like to refer to a specific block and show the image and the title there as well.

Is there a method of an operation like this?

The images are not so hard, since they are not stored in the “block” but on the page itself. So I could find it via query in the panel.

Where do you want to access this particular block? What are the search criteria?

There is template A with many blocks. From this template, there are 8 pages. So a lot of blocks. These blocks are created by different authors. Each block has at least a file and a text.
In another template B, I am listing the authors and want to choose one bloc they created. So there would not be a filter – its one out of all blocks from any page with template A.

Linking to the block is easy, but I would like also to show the text and file from the chosen block in template B. So here it does not have to be a block, just the content of a block from another page.

Just to clarify, are we talking about showing this information in the Panel or on the frontend? Why don’t you simply select the block in the Panel via a select field and then output the information on the frontend?

Both. I mean, selecting the block would be in the panel and showing its content would be in the frontend.
So you mean the field type “select” and then I can choose the block? That would be awesome.

Just checking it out. You mean i can find the blocks via query in the panel? Documentation says: »The result must be a collection of pages , files , users or a structure object« For my case it would need also to allow a collection of blocks, right? Or is a block a structure object?
Or how you get there?

See: Query Language | Kirby CMS

1 Like

Wow. perfect!