Using some jargon borrowed from wordpress – can you do custom content types and then include lists of those items in pages?
I’m taking a look at Kirby for some client work but it’s not immediately apparent from the docs how to do this.
Just so you know my end-to-end use-case: I’m making a basic business website. There is a page that contains partners the company works with. In the panel, the client should be able to add a new partner, and fill out the text + image for that partner. Then on the page a widget is rendered for that partner. If you click on the widget, there’s a lightbox with more content for that item.
Forgive me if this isn’t a flat-file mindset Thanks!
The Panel allows you to generate all sorts of forms by creating a blueprint for that page. So for you example, you could create a page called called partners:
What you would do:
- create a new blueprint called partner.php
- in that blueprint, define the fields you need; since you need to add multiple partners, you would go for a so called structure field that takes repeating entries with several fields, e.g. a field for the name of the partner, a field for some text, and a field for the image.
- you would then also create a template for the page (partner.php in site/templates), that would then render the partners onto the page. Templates define the ( html ) output of your content on the page.
However, a structure field is only one way of achieving this. Depending on the amount of information you want to store, you may opt for using subpages to a page instead. The information in these subpages would then be aggregated on your partners page (in the same way as a list of blog articles, or projects).
In this way, you can create many different Panel forms for many different kinds of content.
Looks great! I’ll dig in some more and let you know if I have questions.
You’re use case as with most use cases are perfectly suited for a flat CMS. There’s only few things I wouldn’t advise against doing with Kirby.
Also. This forum will always be there to help you learn Kirby. Welcome!