mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Fix #1307 -- Document hierarchies in navigation signals
This commit is contained in:
@@ -36,6 +36,12 @@ on the type of navigation. You should also return an ``active`` key with a boole
|
|||||||
set to ``True``, when this item should be marked as active. The ``request`` object
|
set to ``True``, when this item should be marked as active. The ``request`` object
|
||||||
will have an attribute ``event``.
|
will have an attribute ``event``.
|
||||||
|
|
||||||
|
You can optionally create sub-items to create hierarchical navigation. There is two
|
||||||
|
ways to achieve this: Either you specify a key ``children`` on your top navigation item
|
||||||
|
that contains a list of navigation items (as dictionaries), or you specify a ``parent``
|
||||||
|
key with the ``url`` value of the designated parent item.
|
||||||
|
The latter method also allows you to register navigation items as a sub-item of existing ones.
|
||||||
|
|
||||||
If you use this, you should read the documentation on :ref:`how to deal with URLs <urlconf>`
|
If you use this, you should read the documentation on :ref:`how to deal with URLs <urlconf>`
|
||||||
in pretix.
|
in pretix.
|
||||||
|
|
||||||
@@ -73,6 +79,12 @@ a fontawesome icon name with the key ``icon``, it will be respected depending
|
|||||||
on the type of navigation. You should also return an ``active`` key with a boolean
|
on the type of navigation. You should also return an ``active`` key with a boolean
|
||||||
set to ``True``, when this item should be marked as active.
|
set to ``True``, when this item should be marked as active.
|
||||||
|
|
||||||
|
You can optionally create sub-items to create hierarchical navigation. There is two
|
||||||
|
ways to achieve this: Either you specify a key ``children`` on your top navigation item
|
||||||
|
that contains a list of navigation items (as dictionaries), or you specify a ``parent``
|
||||||
|
key with the ``url`` value of the designated parent item.
|
||||||
|
The latter method also allows you to register navigation items as a sub-item of existing ones.
|
||||||
|
|
||||||
If you use this, you should read the documentation on :ref:`how to deal with URLs <urlconf>`
|
If you use this, you should read the documentation on :ref:`how to deal with URLs <urlconf>`
|
||||||
in pretix.
|
in pretix.
|
||||||
|
|
||||||
@@ -173,6 +185,12 @@ should contain at least the keys ``label`` and ``url``. You should also return
|
|||||||
an ``active`` key with a boolean set to ``True``, when this item should be marked
|
an ``active`` key with a boolean set to ``True``, when this item should be marked
|
||||||
as active.
|
as active.
|
||||||
|
|
||||||
|
You can optionally create sub-items to create hierarchical navigation. There is two
|
||||||
|
ways to achieve this: Either you specify a key ``children`` on your top navigation item
|
||||||
|
that contains a list of navigation items (as dictionaries), or you specify a ``parent``
|
||||||
|
key with the ``url`` value of the designated parent item.
|
||||||
|
The latter method also allows you to register navigation items as a sub-item of existing ones.
|
||||||
|
|
||||||
If your linked view should stay in the tab-like context of this page, we recommend
|
If your linked view should stay in the tab-like context of this page, we recommend
|
||||||
that you use ``pretix.control.views.organizer.OrganizerDetailViewMixin`` for your view
|
that you use ``pretix.control.views.organizer.OrganizerDetailViewMixin`` for your view
|
||||||
and your template inherits from ``pretixcontrol/organizers/base.html``.
|
and your template inherits from ``pretixcontrol/organizers/base.html``.
|
||||||
|
|||||||
Reference in New Issue
Block a user