Skip to main content

Navigation inside a workspace

New in v14.2.0

This page describes ways to adjust the navigation flow, to improve user experience, within a tree-type app.

Entity as start page

By default, users start on the dashboard when entering a workspace:

For some apps, users might have a better experience if they immediately land on some entity, instead of the dashboard, upon entering the workspace. This can be achieved by setting the use_as_start_page argument on one of the initial entities:

import viktor as vkt


initial_entities = [
vkt.InitialEntity("Top-level entity", use_as_start_page=True, ...),
...
]
note

If redirection of the user to the assigned starting entity fails, he/she will be redirected to the dashboard instead.

Manage child entities within editor

By default, when a user then clicks on an entity in the side navigation menu ("My Folder" in the below example), he/she will be directed to the entity browser view:

The entity browser view can, in some cases, be confusing, as the user is left with the choice: do I need to create a child entity or open the editor of the current entity?

By implementing the ChildEntityManager, management of child entities (e.g. creation, deletion, navigation) is moved within the editor of the parent entity. By doing so, the browser view is automatically skipped, and users will directly enter the editor when navigating to the parent entity. This way a developer can guide the user better throughout the application:

import viktor as vkt


class Parametrization(vkt.Parametrization):
manager = vkt.ChildEntityManager('MyEntityType')