Getting Started

Add a News Content View on Workspaces

This requires to have the JSF UI addon installed on your server.

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

  1. Create a new content view called NewsTab.
  2. 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}
  3. 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 widget

    Don'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

  1. Create a new document type:
    • featureID: Workspace
    • Extends: Folder
  2. In the Definition tab:
    • Accepted Children Type: select Folder, Workspace, Note, File and OrderedFolder.
    • Show Create Child Action: checked.
  3. In Tabs > Content Views tab: add a new tab configuration called News that uses the NewsTab content view and has order 1.
  4. Edit the layouts to remove the default Studio warning.


2 months ago manonlumeau Fix JSF UI required on How to Publish a News feature in workspaces
2 months ago manonlumeau Add multiexcerpt on every page of the tutorial
2 months ago Loubna Benzaama Fix Showcase Content add-on doc
3 years ago Manon Lumeau 10
3 years ago Manon Lumeau 9
3 years ago Manon Lumeau 8
3 years ago Manon Lumeau 7
5 years ago Alain Escaffre 6
8 years ago Solen Guitter 4 | added tip on widget style
8 years ago Solen Guitter 5
8 years ago Solen Guitter 3
8 years ago Solen Guitter 2
8 years ago Solen Guitter 1
History: Created by Solen Guitter

We'd love to hear your thoughts!

All fields required