getgrav / grav-plugin-relatedpages

Grav RelatedPages Plugin
http://getgrav.org
MIT License
17 stars 7 forks source link

Missing Quotes? #14

Closed paulmassen closed 7 years ago

paulmassen commented 7 years ago

I'm not sure, but I noticed that the collection definition as set by default might not work as it lacks the single quote wrapping the /blog slug.

rhukster commented 7 years ago

Actually, this is a test field, so the default needs to be a text string. It has the YAML option set, so it will be saved as nested YAML in the configuration, but the default needs this string format.

paulmassen commented 7 years ago

I understand, but what I meant is that when enabling the plugin, the value is stored as: '@page : /blog' which doesn't work, even on default antimatter. In the blueprints, modifying the default text for:

   filter.items:
      type: text
      yaml: true
      label: PLUGIN_REL_PAGES.ITEMS
      help: PLUGIN_REL_PAGES.ITEMS_HELP
      default: '''@page'': ''/blog'''

with the triple single quote would actually store the working value: '@page': '/blog'

I think this could help others, as I too got confused about why the plugin would not work until I modified this value with the correct format.