I have an app that is used in some different workspaces. Is there a way that I can dynamically name the root entity (created with InitialEntity in _init.py) as a function of the workspace’s name? e.g. if the users open the workspace “App for Alice” they will first see “Alice”, if they open “App for Peter” they will first see “Peter”, etc.
Thanks.
Thank you for using the community! To answer your question, the dynamic capabilities outside the editor is quite limited, and what you would like to achieve, I believe, is currently not possible. It would, however, be interesting to understand why you would like to have this possibility?
There are feature requests where developers would like to render text that are dynamic in editors in a similar way as the normal markdown text, which you can find in this feature request:
We are developing an app that is used by different users groups. We have 2 constraints: the users of a group must not have access to the working space of the other groups; and the creation of new working spaces/groups can be done by people who have no coding experience. So actually we use Workspaces for this purpose. However, when the users open their workspace, they will see exactly the same root name, regardless of the group to which they belong. It’s the reason why we want to dynamically set a name for the root entity that matches the corresponding group/workspace.
You could consider using the newly added argument to the InitialEntityuse_as_start_page, which allows you to redirect users directly into a root entity’s editor:
The user is therefore not welcomed by the dashboard page, but rather the editor of the root entity, which has much more flexibility. Would this help?