In this article you will learn how to configure a custom button in Athento at team level. These buttons can be displayed in the application header or in the left sidebar navigation bar. They are especially useful for launching frequent actions, such as guided form creation, although they can be used for different purposes.
With this functionality you will be able to include custom buttons like those that were previously added with custom code, but without needing to modify the application code.
Athento allows you to add two types of buttons at team level:
- Link type: when clicked, the user is redirected to a defined link.
- Custom type: allows embedding the desired HTML code.
These buttons are added and configured from the advanced administration, under Action Buttons.
To create a new Action Button, use the Add Action Button option.
Next, configure the following fields:
- Target content type: select the value “teams | team”.
- Target object id: enter the ID of the team where you want the button to appear.
- Place: defines where the button will be displayed. At team level these options are available:
- Team – Sidebar: displays the button in the sidebar.
- Team – Header: displays the button centered in the header (top bar).
- Team – Right header: displays the button in the header, on the right.
- Type: select the type of button you want to display.
- link: add the link to which it will redirect when clicked.
- custom: displays the HTML element configured in the button’s html attribute.
- button: this option is not available at team level.
If the button is of type Link, also configure these attributes:
- Label: help text that is shown when hovering over the button.
- Style: (in JSON format) defines the custom icon that the button will have:
- icon: icon you want to be displayed.
{"icon" : "fal fa-file-invoice"}
- Params: in Link-type buttons, the URL must be added here in JSON format.
If the button is of type Custom, configure this additional attribute:
- Html: element to be displayed, represented by the HTML code that will be rendered. In this functionality it is possible to include tags from the Django template engine.
Related Articles
How to create a custom button to create forms and require mandatory information before creation?