How to create and display a List
A List is a special type of container that provides a set of features very useful in enterprise content management. A list is able to extend the metadata of its children with specified extra fields, and these extra fields can be easily displayed as columns on the UI. Multiple views can be defined for a single list. Documents in lists can easily be managed and edited using Microsoft Office. This article shows you how can you create and display a list on a page.
Create a Custom List
Find a place in the repository where you want to add a new custom list. For example go to the following workspace:
In the upper right corner open the Workspace actions menu and choose the Create other… menu item.
On the Create other page, choose the Custom List type in the second column. There are a number of other types here; you can choose any one of the list or library types if you want to use any specific feature attached to those types.
After you've named and saved your new list (here we chose the name My Custom List), it will appear in the left menu on the main workspace page.
Alternatively you can enter Content Explorer and find the workspace there. You can add a new Custom List by choosing the appropriate item from the New menu in the right panel.
Display the List with a Content List Portlet
The newly added My Custom List already appears in the left menu on the workspace page. But if you want to display the whole list on the workspace main page you should follow the steps below.
Add a Content List Portlet to the workspace main page
On the workspace main page open the PRC (by clicking on the Page actions link) and jump to the application. This will take you to the This/Browse page of the workspace as you can see in the address bar of the browser. For more information about This pages please visit the Smart Application Model article.
Switch the page to Edit mode using the PRC and add a Content List Portlet to one of the zones.
Edit portlet properties
Open portlet properties of the previously added Content List Portlet and set the following properties:
- Portlet title (on the User Interface property page): My custom items
- View frame (Content list property page): /Root/System/SystemPlugins/ListView/ViewFrame.ascx (this is the built-in, most commonly used frame; it is a simple ASCX control that contains the toolbar of the list)
- Relative content selector path (Context binding property page): name of the custom list you created previously - in this case, My-Custom-List (please note that this is the URL name of the list, not the display name that we gave it during creation; for more about content naming please visit the Content naming article)
Check in the page (using the PRC) and by pressing the Back to content link navigate back to the workspace. You can see an empty list there that will contain your custom items.
Manage the fields of the list
To add a new custom field to the list you have to open the Settings menu of the list and click on the Manage fields option.
On the Manage fields page choose Single line of text as the field type.
There are a number of options here but you have to fill only the following fields for now:
- Display name: Company
- Name: Company
After saving the new field with the Done editing button and pressing the Done button on the Manage fields page you will be redirected to the workspace page. You can see the new Company field added as the last column of the list.
If you click on the New List Item link on the toolbar you can create a new custom item and fill the Company field with some text.
There are no external references for this article.