In the section, we will:
- prepare a new tab for workspaces,
- override the default Workspace document type to customize it with the newly created tab.
For this section, it is recommended to take a look at the how-tos for a step-by-step approach:
Create a new content view for workspaces
- Create a new content view called
NewsTab
. - Give it the following query filter:
ecm:isVersion = 0 AND ecm:currentLifeCycleState = 'approved' AND ecm:primaryType = 'News' AND ecm:path STARTSWITH ?
and add the query parameter:#{currentDocument.path
} In the Results tab, configure a table with 1 column and 2 two rows. First row is for the title (
dc:title
, with a text widget), second row is for the content (news:body
, with an HTML widget).Style your widgetDon't hesitate to give CSS attributes to the text widget to customize its look. Here is an example of values you can type in the Style text box:
color:#4e9ae1;text-decoration:underline;font-weight:bolder;font-size:large;margin:15px 15px 15px 15px
The view is done. Now we need to apply it to the Workspace document type. To do this, we need to override the default Workspace document type.
Override the "Workspace" document type
- Create a new document type:
- featureID :
Workspace
- Extends: Folder
- featureID :
- In the Definition tab:
- Accepted Children Type = add Folder, Workspace, Note, File, OrderedFolder.
- Show Create Child Action: checked.
- In Tabs > Content Views tab: add a new tab configuration called
News
that uses theNewsTab
content view and has order 1. - Edit the layouts to remove the default Studio warning.