Closed rainpoiss closed 7 years ago
That construction doesn't make sense to me.
A hidden field is just:
hidefield:
type: hidden
and everything under fields
is ignored. Unless I'm missing something?
I want to hide slug filed, which type is slug
You want to hide it in the CMS? Then that's not a JSONAPI issue.
If you want to hide it from the JSONAPI output, then configure that in the configuration file jsonapi.bolt.yml
:
list-fields: [ ... ]
item-fields: [ ... ]
allowed-fields: [ ... ]
See https://github.com/xiaohutai/jsonapi/blob/master/config/config.yml.dist#L7-L16
Yes I want to hide it in the CMS
If you need a hidden field, then it should be something like:
some_field:
type: hidden
But then it won't act as a slug
anymore (something that you see in the URL), which is probably not what you want.
Alternatively, you can add a custom extension that adds an asset (CSS/JavaScript) that then hides the slug field for that contenttype. See https://docs.bolt.cm/3.3/extensions/bundled/introduction for making your own extensions.
From what I understand, this is not a JSONAPI issue.
Uncaught Exception: ContextErrorException .
ContextErrorException in FieldFactory.php line 94:
contenttype.yml: