mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-14 18:23:14 +00:00
Remove 'customising the tabbed interface' section from 1.0 release notes
It's covered by the 'editing API' docs, and isn't something that developers need to know about at the point of upgrading.
This commit is contained in:
parent
f0b12dede4
commit
d22413dafc
1 changed files with 1 additions and 30 deletions
|
|
@ -74,7 +74,7 @@ Admin
|
|||
* ``FieldPanel`` now accepts an optional ``widget`` parameter to override the field's default form widget
|
||||
* Page model fields without a ``FieldPanel`` are no longer displayed in the form
|
||||
* No longer need to specify the base model on ``InlinePanel`` definitions
|
||||
* Page classes can specify an edit_handler property to override the default Content / Promote / Settings tabbed interface
|
||||
* Page classes can specify an edit_handler property to override the default Content / Promote / Settings tabbed interface. See :ref:`customising_the_tabbed_interface`.
|
||||
|
||||
|
||||
**Other admin changes**
|
||||
|
|
@ -267,35 +267,6 @@ Previously, the forms for creating and editing images followed Django's default
|
|||
|
||||
admin_form_fields = Image.admin_form_fields + ['photographer']
|
||||
|
||||
Customising the tabbed interface
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Wagtail organises panels into three tabs: 'Content', 'Promote' and 'Settings'. Depending on the requirements of your site, you may wish to customise this for specific page types - for example, adding an additional tab for sidebar content. This can be done by specifying an ``edit_handler`` property on the page model. For example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from wagtail.wagtailadmin.edit_handlers import TabbedInterface, ObjectList
|
||||
|
||||
class BlogPage(Page):
|
||||
# field definitions omitted
|
||||
|
||||
BlogPage.content_panels = [
|
||||
FieldPanel('title', classname="full title"),
|
||||
FieldPanel('date'),
|
||||
FieldPanel('body', classname="full"),
|
||||
]
|
||||
BlogPage.sidebar_content_panels = [
|
||||
SnippetChooserPanel('advert', Advert),
|
||||
InlinePanel('related_links', label="Related links"),
|
||||
]
|
||||
|
||||
BlogPage.edit_handler = TabbedInterface([
|
||||
ObjectList(BlogPage.content_panels, heading='Content'),
|
||||
ObjectList(BlogPage.sidebar_content_panels, heading='Sidebar content'),
|
||||
ObjectList(BlogPage.promote_panels, heading='Promote'),
|
||||
ObjectList(BlogPage.settings_panels, heading='Settings', classname="settings"),
|
||||
])
|
||||
|
||||
``construct_wagtail_edit_bird`` hook has been renamed
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue