Hello
First of all a disclaimer, I’m probably using kirby in a wrong way, learning everything by doing mistakes so my question may be dumb.
I would like to access the result html from a snippet into my default.json.php template in order to load it with ajax client side.
pseudo code would look something like that, and it’s obviously wrong :
$content = snippet('k7content');
$data = [
'title' => $page->title()->value(),
'content' => $content
];
echo json_encode($data);
Is there a way to do that ?