diff --git a/docs/advanced_topics/icons.md b/docs/advanced_topics/icons.md index fac4e5f3ce..619fbb8642 100644 --- a/docs/advanced_topics/icons.md +++ b/docs/advanced_topics/icons.md @@ -75,6 +75,7 @@ Place your app before any Wagtail apps in `INSTALLED_APPS`. Wagtail icons live in `wagtail/admin/templates/wagtailadmin/icons/`. Place your own SVG files in `/templates/wagtailadmin/icons/`. +(available_icons)= ## Available icons Enable the [styleguide](styleguide) to view the available icons and their names for any given project. diff --git a/docs/reference/pages/panels.md b/docs/reference/pages/panels.md index 87e55f618a..ed9f6bb601 100644 --- a/docs/reference/pages/panels.md +++ b/docs/reference/pages/panels.md @@ -19,7 +19,7 @@ Here are some Wagtail-specific types that you might include as fields in your mo ### FieldPanel ```{eval-rst} -.. class:: FieldPanel(field_name, classname=None, widget=None, heading='', disable_comments=False, permission=None) +.. class:: FieldPanel(field_name, classname=None, widget=None, icon=None, heading='', disable_comments=False, permission=None) This is the panel used for basic Django field types. @@ -27,7 +27,7 @@ Here are some Wagtail-specific types that you might include as fields in your mo This is the name of the class property used in your model definition. - .. attribute:: FieldPanel.classname + .. attribute:: FieldPanel.classname (optional) This is a string of optional CSS classes given to the panel which are used in formatting and scripted interactivity. @@ -37,6 +37,10 @@ Here are some Wagtail-specific types that you might include as fields in your mo This parameter allows you to specify a :doc:`Django form widget ` to use instead of the default widget for this field type. + .. attribute:: FieldPanel.icon (optional) + + This allows you to override the icon for the panel. If unset, Wagtail uses a set of default icons for common model field types. For a list of icons available out of the box, see :ref:`available_icons`. Project-specific icons are also displayed in the :ref:`styleguide`. + .. attribute:: FieldPanel.heading (optional) This allows you to override the heading for the panel, which will otherwise be set automatically using the form field's label (taken in turn from a model field's ``verbose_name``).