Panel Blueprint how to list pages with particular category

I have a portfolio parent page, with child project pages. These project pages have categorises applied to them (some have more than one category applied to them).

I now want to create three more pages (on the same level as the portfolio parent page). One for each category or service. And for these pages to display a list of projects categorised with that service. I want to manually be able to order the list.

In the Panel Blueprint how to do I display all the pages with a particular category (that are all child pages of a different page)? I presume once I have the list displayed I can order the list to my choosing in the Panel?

I’ve tried the following but it doesn’t work:

title: Portfolio Branding

fields:
	section1:
		type: pages
		label: Pages categorised as branding
		query: categories('branding')

You cannot use a query in a pages section. The only possible filters are by template and status.

You could use the pagesdisplay section plugin: https://getkirby.com/plugins/rasteiner/pagesdisplay, which would allow you to query your pages.

However, you wouldn’t be able to add new pages and

No, this won’t be possible, because the order of the pages is determined by the order they have in their original parent.

If you wanted to sort them manually, you would have to use a pages field instead.

This usually would have the disadvantage that you would have to add the entries manually, but you could also automate this by appending new pages via a hook.

Hi. I can now manually add pages in the Panel and sort the order of them. So that’s good. Here’s my Blueprint code:

title: Portfolio Branding

fields:
	services_projects:
		type: pages
		label: Branding case studies
		query: site.find('portfolio')

But I’m struggling to create the page Template to get the pages to display. Here’s what I have:

<ul class="portfolio">
	<?php foreach ($page->services_projects() as $project): ?>
	<li>
		<a href="<?= $project->url() ?>">
			<?php if ($image = $project->portfolio_thumbnail()->toFile()): ?>
			<img src="<?= $image->url() ?>" alt="">
			<?php endif ?>
			<p><strong><?= $project->heading() ?></strong><br><?= $project->subheading() ?></p>
		</a>
	</li>
	<?php endforeach ?>
</ul>

Please see documentation for the pages field. Each field has a section how to render it in templates.

Okay, thanks. I wasn’t sure if it could be done. But it can and it works. Yippee