Hi all, could anyone point me in the right direction here?
I’m looking to write a content representation for a quasi-single-page site where I fetch all content ordered chronologically regardless of the content’s parent page type.
What I’d like to do is send a query string to the content representation endpoint, e.g. /all.json?page=1 and get back the 50 most-recent content pieces sorted by date.
So from a content folder strutured like this: content/projects, content/journal, contend/shop items I could fetch a JSON response object which would look something like this:
{
project: { … },
journal: { … },
journal: { … },
shop item: { … },
project: { … },
}
One idea I’ve had is to do away with the notion of different ‘page’ types entirely and just keep everything under one page type, e.g. content/everything. I think this would allow me to leverage Kirby’s built-in pagination mechanisms, but it certainly makes adding fields conditionally a lot tricker.
Any ideas would be appreciated! ![]()