medienbaecker / kirby-modules

Plugin for modular Kirby websites
MIT License
73 stars 7 forks source link

Allow Modules along with real subpages #30

Closed mmoollllee closed 3 years ago

mmoollllee commented 3 years ago

Hey there,

I hope I'm not getting something wrong here, but I see a "Modules" subpage when using the Modules Plugin along with real subpages and getting a redirect for those too.

Bildschirmfoto 2021-09-05 um 22 25 24

Is this blueprint even possible?

  - width: 1/2
      sections:
        subpages:
          headline: Inhalte
          type: pages
  - width: 1/2
      sections:
        modules: true
medienbaecker commented 3 years ago

Yes, that's possible by limiting the templates for your regular pages section.

type: pages
templates:
  - default
  - contact
  - etc

It's currently not possible to hide a page without completely disabling the subpages — but the Kirby team is currently working on it: https://github.com/getkirby/kirby/pull/3621

mmoollllee commented 3 years ago

Yay! That does the job :) Thank you!

squareclouds commented 2 years ago

hi everyone! it seems this does not work for the site.yml, here i am getting a sync between the modules and pages. in a regular page it works though. any ideas? all hlep is appreciated!

Bildschirmfoto 2022-06-02 um 18 41 24

squareclouds commented 2 years ago

PS: oh i see now that i cannot even create modules for the site... this is probably per design?

medienbaecker commented 2 years ago

Yes, using modules in the site.yml doesn't work because it isn't a page.

I'm wondering if you'd rather want to use modules on the home page and display this section in the site.yml?

# site/blueprints/site.yml
sections:
  modules:
    parent: site.homePage.find('modules')
# site/blueprints/home.yml
sections:
  modules: true
squareclouds commented 2 years ago

ah ok, that would be a possibility, didnt know this was possible. but yes, at the end i created a page and put everything in there. since your suggestion would create redundancy when navigating the panel (at least if i understood correctly) that might be confusing for the client i will leave it as it is, but it is noted! thank you!

medienbaecker commented 2 years ago

Absolutely. I tend to hide the home page when I display the modules of it directly in the site.

derhammerhof de_panel_site