The content presenter is a very powerful tool if your portal is content driven. The Content Presenter allows you to show content from your content server in your portal. You can use predefined templates or create your own ones.
WebCenter 11g PS3 has been a big improvement for the Content Presenter. It is easier in use and more versatile. You can easily select content based upon a folder or query, choose a template and preview the result.
Before you can use we need to create a connection to the Content Server. This can be done in JDeveloper by selecting Content Repository Connection in the Connection section from the New Gallery:
In the Create Content Repository Connection popup you need to specify a name for the connection.
Select Oracle Content Server from Repository Type.
Make sure you have select Set as primary Connection for Document Services. This is important when you use document services taskflows. They will always use the primary connection by default.
Specify the parameters that matches your content server. In my case they are:
RIDC Socket type: socket
Server Host Name: localhost
Content Server Listener Port: 4444
From UCM 11g on you need to enable the Content Server Listener Port. If you don't know how to do this, I have explained this in my paper about WebCenter and UCM integration on page 5 and 6: http://www.yonaweb.be/sites/default/files/webcenterUCMintegration_0.pdf
Press OK to create the connection.
You can now run your portal and edit some page for example the home page. Did you know, when logged in and you have sufficient rights to edit a page, you have a shortcut for editing the page without needing to go to the resource manager. You can just prest CTRL+SHIFT+E. This will bring you directly in edit mode.
In the Content Management folder of the resource catalog you will find the Content Presenter. By pressing the Add button you can add it to your page:
You will notice that the content presenter shows a message saying you need to configure the component before it can show some content.
You can configure the Content Presenter by clicking the Edit button in the toolbar. This will open the Content Presenter Configuration popup:
This is the core window in the content presenter. It consists out of 3 tabs:
In the Content tab you can select the type of content:
In this example I have selected a folder from the content server:
When you select a folder or item you will also see some information about that file or folder as shown in the above image.
In the second tab we need to select the template. Based upon the content source from the first tab, you will have other templates in the second tab. There are two types of templates being single item templates and multiple items template.
Because I have selected a folder, I will see the multiple item templates:
I will select Carousel View because the folder I have selected contains only images. By selecting this template, the images will be shown in a carousel which is a nice view.
As you can see you have lots of templates. When you select a template you will get a description telling you what the template does.
When we press OK, the settings are stored and applied to the content presenter. We know see the content in our portal:
This is basically how the content presenter works. It is a nice taskflow which allows lots of flexibility. You can also create your own templates in case the out of the box templates do not meet your requirements.