In this section, we will:
- create the News document type,
- create the content template with News Folder,
- add a button dedicated to news creation.
For this section, it is recommended to take a look at the how-tos for a step-by-step approach:
Create the News document type
- Create a new document type called
News
that extends the "Document" type. On the Definition tab:
Container type: Document
A document type must have a container. However if you do not want your document type to be displayed in the available document list window, you can select Document type as the container.
- Inherited schemas: add
files
schema (necessary so that pictures that are uploaded with HTML widget are stored).
- On the Schema tab, add a field
body
of typeString
. - Create the layouts of the document:
- Creation form metadata:
dc:title
as text widget,news:body
as HTML widget. - Edit form metadata: import Creation layout (it is the same).
- View form metadata: import Creation layout and add
dc:valid
as DateTime widget on a third row.
- Creation form metadata:
The "News" document type is now created. However, there is no way to access the creation form for now.
Create the structure template for News folder to be available automatically
- Create a new Structure Template:
- ID: Workspace
- Target Document Type: Workspace
- Add a new built-in type: Folder
- Node Name: NewsFolder
- Title= News Folder
Now, every time a workspace is created, a folder called "News Folder" will automatically be created in it by the system.
Add the news creation button
Here are the steps to create the button to create news from a Workspace into the News Folder:
- Create a new User Action. Its properties:
- ID:
CreateNewsButton
- Label: Create news
- Category: Folder toolbar
- ID:
- Enablement conditions:
- User has permission :
Write
- Current document has type :
Workspace
- User has permission :
Create new operation chain
CreateNewsChain
:Step Operation Parameter 1 Fetch > Document Value: ./NewsFolder
2 User Interface > Navigate to Document 3 User Interface > Show Create Document Page Value: News