content_panels in StreamBlock StreamField

2019-07-07 01:22发布

问题:

I have a few custom StreamField blocks defined. I'd like the option to be able to collapse some properties within the custom blocks much like i can do with a standard page model using content_panels however I don't believe this is supported. Correct?

回答1:

It does not appear that this is possible without writing some custom css/js for your admin pages.

There is one work around solution for collapsing one StreamFieldPanel inside a standalone MultiFieldPanel, however this is not for blocks within the StreamFieldPanel. Direct link to Comment

This feature has been requested and it appears it will not be implemented:

  • Issue 1532 Explains why this feature does not exist.
  • Issue 1336 More explanation from Gasman about why this would add complexity and not really solve the UI problem, but there might be a future related feature in the works.