Open paulmassen opened 7 years ago
There are several problems actually: Example: Does not work:
items: '''@page'': /blog'
items: '@page': /blog
items: ''@page': /blog'
Does work:
items:
'@page': /blog
items:
@page: /blog
The first three that don't work seem like pretty poor YAML, though apparently 1 is valid, the other two do not validate against YAML. The two that work are both valid YAML.
Maybe a solution would be to use something like this: https://github.com/getgrav/grav-plugin-admin/blob/develop/blueprints/admin/pages/modular_new.yaml#L41
Tested the one that is valid, but it does not work neither. I think the new line with the indent is required
Yes you need new line and proper spacing:
filter:
items:
@page: /home
tested on Grav 1.3.8, Admin 1.6.6, Related Pages 1.1.4
I changed the text field to multilevel, and it seems to work. Some more information about how to properly fill this field might be needed, but the default value should give users a good hint about how to use it.
Let me know if it works for you too.
So, after hours and hours of trying to find why I was not able to use relatedpages, I finally found what was the cause of the problem.
Step to replicate
Install relatedpages plugin. the default relatedpages.yaml looks like this:
Now, within the admin, when clicking on save, the yaml validation will generate this in user/config/relatedpages.yaml:
Which simply does not work.
I was already feeling like something was wrong with this blueprint so I made this PR a while ago: https://github.com/getgrav/grav-plugin-relatedpages/pull/14
But I don't think this is the solution neither.
Let me know if more info is needed.