You should follow this how-to if you want to either:
- Replace the default Content tab of a folderish document type
- Or add a new tab from which users should be able to create children documents.
To do so, you basically need to create a new tab with some specific properties.
Before You Start
Before you follow the steps below, you should already have configured the items below:
- In the Settings > Application Definition menu, make sure that the Nuxeo JSF UI addon is in the list of packages to install.
- A document type with the following properties:
- Folderish facet
- Accepts children document types (File or extending file)
- A content view, obviously.
Setting up Your Custom Tab
To set a content view with Drag&Drop and the New button:
- In Studio, go to Listings & Views > Tabs.
- Click the New button and enter a name for the Feature ID:
ContentViewWithDnDandNewButton
. And click Next to validate. - Set a value for Order if you don't want the new tab to be displayed as the first tab.
- Drag the widget Drop zone from Featured widgets > Built-in widgets and drop it in the first cell of the tab grid.
In the Widget Layout Editor that pops up, set the properties as follow:
- Hide label: checked
- Add surrounding form: unchecked
- Custom configuration properties:
dropContext
:ContentView
- Click on Save.
- Click on the icon of the Drop zone widget.
- In the first line, drop a Generic widget from More widgets > Advanced widgets.
In the Widget Layout Editor, set the properties as follow:
- Hide label: checked
- Widget type: documentActionsWithForms
- Category: Folder Toolbar
- Actions Display: Buttons
- Overall display: Horizontal bloc
- Click on Save.
- In the second line, drop a Content View widget from Featured widgets > Tab widgets.
In the Widget Layout Editor, set the properties as follow:
- Content View name: Select the content view you want to display.
- Click on Save.
- Cick on Go back to previous page to go back on the tab definition screen.
- Go to your tab's Activation tab and set the conditions (permissions, document types, etc) to make the new tab visible. Save.
Now you just need to hot-reload your Studio project. And a new tab will be visible for the selected document types.
Related Documentation