![]()
Portal Express, Version 6.0
Operating systems: i5/OS, Linux, Windows
Site creation example
This example describes the steps required to render a simple web page by creating and linking various IBM® Workplace Web Content Management™ items.
To create and preview a simple web page you will need to create the following items:
- A site
- A site area
- A presentation template
- An authoring template
- A content item
- Components
You will also need to:
- Define a template map between the authoring template and presentation template.
- Add a Web Content Management tag for each element displayed within a presentation template.
For a more advanced example see the Integrated content example.
Create a simple workflow
Before creating any other item, create a simple workflow to use when creating a content item.
- Create a workflow action named Publish.
- Create a workflow stage named TestStage with the action named Publish selected in the "Execute on Entering Stage" parameter.
- Create a workflow named TestWorkflow with TestStage selected as the only workflow stage.
Create a site and site area
- Create a site named TestSite.
- Save and close the site form.
- Create a site area named TestSiteArea.
- Save and close the site area form.
Create a presentation template
- Create a presentation template named TestPresentationTemplate.
- Create a simple HTML table in the presentation template by adding the following code into the presentation template section.
<html> <head></head> <body TEXT="Black" BGCOLOR="White" BACKGROUND="" LEFTMARGIN="0" RIGHTMARGIN="0"TOPMARGIN="0" BOTTOMMARGIN="0">.<table border="1"> <tr> <td></td> <td></td> <td></td> </tr> </table> </body> </html>
- Save and close the presentation template.
Create an authoring template
- Create an authoring template named TestAuthoringTemplate.
- Click Default Content Settings .
- Click Manage Elements.
- Add a text element named body to the authoring template.
- Save and close the authoring template.
Create some content
- Create a new content item named TestContent.
- Select TestAuthoringTemplate when creating the new content item.
- Go to the contents section and enter some text in the body element.
- Go to the workflow section and select the Test Workflow.
- Click Save.
- Select TestSiteArea.
- Click OK and save and close the content item.
Map templates and link content
- Go back to the site framework view.
- Go to Site Areas -> Site -> TestSite
- Open TestSiteArea.
- Edit the template map and link TestPresentationTemplate and TestAuthoringTemplate.
- Set TestContent as the default content for the site area.
- Save and close the site area.
Reference the body element in your presentation template
- Go back to the presentation template view and open TestPresentationTemplate.
- Enter the following element tag into one of the table cells of the presentation template.
<element type="Content" context="current" key="Body"/>The content of the element tag will change depending on which content item is displayed.
- Save and close the presentation template.
Preview the web page
- Go back to the content view and preview TestContent.Tip: You may need to configure your browser to allow pop-ups to preview the content.
- The text you typed in the body element should appear on the rendered web page.
- Close the preview window.
Add a navigator
- Create a new navigator component named TestNav with the following parameters:
- Start Type = current content
- Ancestor Level = All.
- Add a placeholder in Navigator result design 1 to display links in the navigator:
<placeholder tag="Namelink"/><br>.- Save and close TestNav.
Reference the navigator in your presentation template
- Go back to the presentation template view and open TestPresentationTemplate.
- Enter the following component tag into one of the table cells of the presentation template.
<component name="TestNav" />As we are referencing the navigator directly from a component, the navigator is always displayed in this presentation template. The content of the navigator will change depending on which site area and content items are currently being referenced.
- Save and close the presentation template.
Preview the web page
- Go back to the content library view and preview TestContent.
- A navigator should appear on the rendered web page.
- Close the preview window.
Add an image component
- Create a new image component named TestImage.
- Save and close the image component.
Reference the image in your presentation template
- Go back to the presentation template view and open TestPresentationTemplate.
- Enter the following component tag into one of the table cells of the presentation template.
<component name="TestImage" />As we are referencing the image directly from a component, the Image is always displayed in this presentation template.
- Save and close the presentation template.
Preview the web page
- Go back to the content library view and preview TestContent.
- An image should appear on the rendered web page.
- Close the preview window.
Parent topic:
Before creating Web content