The content portlet allows you to display a static fragment of content that has been created in the content repository. Using the content portlet you can browse the content repository to select the content you wish to display.
When you first add a content portlet to the page, it will not have a fragment associated with it and will therefore display the default page. This informs you that the portlet needs editing. To assign a piece of content to the portlet select the Edit button (by default, this appears as a small pencil icon that appears on the top right hand corner of the portlet).
The Content Name field at the top of the screen allows you to enter the path to a piece of content. You can either enter the path to the file (if you know the path), or you can browse the content repository by selecting the Browse button.
Once you have entered the name of the content fragment (either manually or by browsing the content repository), select the Ok button. The selected piece of content will now be rendered in the portlet.
When you have selected the Browse button that appears next to the content name field, you will be able to browse the content repository. The browse screen contains a list of all of the content fragments that you can use within the portlet. These are structured into folders, similar to the file system on a computer.
To help distinguish between the different types of files and folders within the content repository, a number of icons have been used, the following table is the key for these icons:-
|This indicates a folder. To drill 'into' a folder and see it's contents, click on it's title. This also works in a similar fashion to a computer file system.|
|This indicates a fragment that can be included in the portlet.|
Using the structure of the content repository you can move around the various folders that have been defined. You can look into a folder by clicking on its name, which appears as a link.
To move up a level, or to move to any previous level of the content repository structure you can use the breadcrumb trail that appears at the top of the page. This breadcrumb trail contains a list of the folders you have travelled through. Each level displayed can be selected, and once it is selected the contents of that folder will be displayed.
Each content fragment that can be selected will have a small radio button to the left of it. To choose a piece of content select the radio button that appears next to the content you wish to include, and select the Ok button. Once you have done this, you will be returned to the edit screen, with the path to the selected content inserted into the
The content portlet supports languages in two different ways, and you can use these methods in conjunction with each other to ensure that content is displayed correctly for all supported languages.
You can either let the content portlet decide the content it should use, which is achieved by using a defined file structure (discussed in the following section), or you can explicitly set the name of the content that should be used for a specific language. Both of these methods are discussed in further detail below.
When a piece of content is selected in the content portlet, it will attempt to locate the best file to display based on the users current browser and language settings. It does this by looking in pre-defined directory structures.
The portlet will search in the following directories, in this order
For example, if you had selected a file named Example.jsp in the root folder, the portlet would look in the following directories until it found a best match (presuming you are running Internet Explorer with the browser set to English US ): -
As well as allowing the portlet to search for the best matched content, you can also explicitly set the name of a file you wish to display for a given language. This will override any other filename and the automatic search feature will not be used.
To explicitly set the content for a language:-
When you associate a piece of content with a specific language, you have the ability to remove that association.
To remove an explicit content association:-