kopia lustrzana https://github.com/wagtail/wagtail
Document AdminOnlyMenuItem in hooks documentation
rodzic
205249b317
commit
3f86de27e0
|
@ -160,7 +160,9 @@ Hooks for building new areas of the admin interface (alongside pages, images, do
|
|||
:attrs: additional HTML attributes to apply to the link
|
||||
:order: an integer which determines the item's position in the menu
|
||||
|
||||
``MenuItem`` can be subclassed to customise the HTML output, specify JavaScript files required by the menu item, or conditionally show or hide the item for specific requests (for example, to apply permission checks); see the source code (``wagtail/admin/menu.py``) for details.
|
||||
For menu items that are only available to superusers, the subclass ``wagtail.admin.menu.AdminOnlyMenuItem`` can be used in place of ``MenuItem``.
|
||||
|
||||
``MenuItem`` can be further subclassed to customise the HTML output, specify JavaScript files required by the menu item, or conditionally show or hide the item for specific requests (for example, to apply permission checks); see the source code (``wagtail/admin/menu.py``) for details.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue