hello everyone,
i just started with kirby and am glad to be joining this beautiful & vital community!
today i was playing around with the new panel cookbook for creating programmable blueprints. i love everything you have put together here @texnixe, it helps so much and my filtered page sections are populating nicely!
the only thing i noticed is, since i integrated the plugin, the first section in my site.yml is not showing up anymore (pls see screenshots). looks like the plugin’s function is still being called on the panel homepage, despite having the if clause right at the start inside your notes.php(in my setup it’s called meals.php though).
as soon as i disable the plugin, the section is rendering again.
any idea why this is happening?
title: Site
columns:
left:
width: 1/2
sections:
# primary pages
primary:
headline: Primary Pages
type: pages
empty: No pages found
status: published
templates:
- home
- shop
- about
image: icon
# secondary pages
secondary:
headline: Secondary Pages
type: pages
empty: No pages found
status: unlisted
templates:
- checkout
- success
- error
image: icon
right:
width: 1/2
sections:
# databases
databases:
headline: Databases
type: pages
empty: No database found
status: unlisted
templates:
- meals
- categories
image: icon
# ecommerce
ecommerce:
headline: Ecommerce
type: pages
empty: No database found
status: unlisted
templates:
- orders
- shipping-methods
- emails
image: icon
as you can see, i am displaying my “meals page” (the one with the dynamic blueprint) inside the “databases section”. but removing the template here, doesn’t seem to solve the issue.
Thanks. But the error occurs for the first primary section, not the database section. Do the rest of the sections show up as intended?
And I assume site.yml is a the standard blueprint in the /site/blueprints folder, not in the plugin? And the only dynamic blueprint you are using is the meals blueprint?
thank you so much for your wonderful support @texnixe, that did the trick!
do you mind explaining why i needed to add this? because i thought the plugin only loads on my meals template, not on every page in the panel. is that not correct?
I guess you are referring to the dynamic fields example? In the example, the field names are set to the page slug in the loop. So to fetch these fields, you would apply the same loop as in the dynamic blueprint.
@texnixe in my dynamic blueprint loop (the same from above), i added other fields, like a headline and a writer. and because each field needs an individual name to store the content, i use the category name as a prefix.
of course i will need to use the same loop inside my template. i can also get the same category name (my prefix) there. but then, how do i get to the content itself? because i guess i can’t do $page->$name . 'label'() here, right?
do you know what i mean?
its a bit hard to explain…