Skip to content

[6.x] Respect "Hidden by default" on title, slug, date and author - #15907

Draft
edalzell wants to merge 1 commit into
statamic:6.xfrom
edalzell:fix/listable-hidden-default-fields
Draft

edalzell wants to merge 1 commit into
statamic:6.xfrom
edalzell:fix/listable-hidden-default-fields

Conversation

@edalzell

Copy link
Copy Markdown
Contributor

Setting slug (or title, date, author) to "Hidden by default" still shows the column in the listing. hidden is the listable default, so the blueprint editor strips it on save, and Field::isVisibleOnListing() treats a missing listable on these four handles as "show".

FieldTransformer now keeps listable on save for these handles, and prefills listable: true when loading them into the editor so it shows what the listing actually does. Other fields keep their trimmed YAML.

Re-saving an untouched slug now writes listable: true. Blueprints where "Hidden" was already stripped aren't migrated; the editor now shows them as "Shown by default" so they can be re-set.

Closes #10792

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slugs are shown in collection tables even with listable set to Hidden by default

1 participant