@lukasbestle
Today I tried the modules plugin for the first time but it does not go that well.
Page blueprint
title: Company
pages:
build:
- title: _modules
uid: modules
template: modules
files: true
fields:
...
Files in site/modules/table/
:
table.yml
table.html.php
table.yml
title: Table
pages: false
files: true
fields:
title: Title table
type: title
modules blueprint
title: Modules
pages:
template:
- module.table
When I’m in page company/modules
and add a page I get this:
I would expect to select the module table here. What is wrong?
texnixe
January 10, 2017, 10:17am
2
That should actually work. Have you checked your indentation? Made sure the file names are really correct? Cleared the cache?
I got it to work. The problem was that my plugin folder was named modules-plugin
like the repo and it did not match the file inside.
However, a new error is popping up. Do you know the reason for this?
texnixe
January 10, 2017, 11:37am
4
This is usually due to an error in your blueprint, in this case the table blueprint.
In the table.yml
I guess? I don’t think there are any errors in that?
title: Table
pages: false
files: true
fields:
title: Title table
type: text
texnixe
January 10, 2017, 11:43am
6
Your field does not have a name. Should be:
title: Table
pages: false
files: true
fields:
title:
label: title
type: title
alexpi
October 13, 2017, 11:18am
8
I have the same problem. When I try to add a module in _modules, just the ‘default’, locked template option appears.
Page blueprint
title: Page
pages:
build:
- title: _modules
uid: modules
template: modules
fields:
title:
label: Title
type: text
Files in site/modules/imageText/:
imageText.html.php
imageText.yml
imageText.yml
title: ImageText
fields:
title:
label: title
type: text
modules blueprint
title: Modules
pages:
template:
- module.imageText
texnixe
October 13, 2017, 11:47am
9
Does the plugin folder have the correct name, i.e. /site/plugins/modules/
?
alexpi
October 13, 2017, 12:31pm
10
Yes. Also my version of Kirby is 2.5.5 if that has any relevance.
Just a guess because I can’t test this right now. Does it change anything when you change your module to just lowercase?
site/modules/imageText/ to site/modules/imagetext
Edit:
Does one of the “default” modules (gallery, text) work?
alexpi
October 13, 2017, 12:47pm
12
Yes, that was it. I should have tried that. Thank you!