I would like to display a pseudo forum, that is basically a blog with comments, from a tab in the panel. But how do I access the pages with the entries in a list template? This is what I like to do:
<?php foreach($site->forum()->listed() as $forumpost): ?>
, but of course Kirby doesn’t know "forum()
Also the forums posts, that I created for testing, don’t get put into the content/5_forum, but just into the content folder.
I could do:
<?php foreach($site->children()->listed() as $forumpost): ?>
A tab doesn’t have a type, so please remove that. It is just a layout element, you cannot do anything with it.
It looks as if you want to store the pages you create via the two sections in a parent called forum. But for this purpose you have to define the parent property in the two sections:
No, the site doesn’t have a parent, but if you don’t specify a parent and you are in the site.yml blueprint, the site becomes the parent of a page you create in a section.
But another stupid question, that I probably asked before, but can’t find the answer to.
I have a page called “forum” in the pages section of the site in the panel. I would like to hide it there. If I go read: false in the options for forum.yml, the pages doesn’t get displayed in the pages section in the panel, which is finde, but then I can’t create new pages, which seems kind of logical.
But oh the other hand, if I let the page “forum” appear in the panel, then there would be no need for a tab.
So, How can I go like “visiblity:hidden” for that page (forum) in the panel?
You can filter that page section by template, so only list templates that don’t include the template the forum page uses. Unfortunately, we don’t have a “not template X” feature yet, so it only works by explicitly listing all other templates.