31
Creating New Page Layouts Use If the page layouts delivered by SAP for the Web Page Composer do not completely meet your requirements, you can create your own page layouts and integrate them into the portal. Prerequisites You have installed the SAP NetWeaver Developer Studio. Procedure Work through the following steps to be able to use new page layouts: ... 1. Creating Files in SAP NetWeaver Developer Studio 2. Carrying Out Configuration in the Portal Content Studio 3. Working Through Configuration Steps in KM 4. Linking Containers and iViews Result When you have completed all steps, you can create new pages in the Web Page Composer based on your own page layouts. Creating Files in the SAP NetWeaver Developer Studio Use To define a new page layout for the Web Page Composer, you create two files in a project in the SAP NetWeaver Developer Studio. You describe the page layout in a JSP file.

Creating New Page Layouts WPC

Embed Size (px)

DESCRIPTION

Creating New Page Layouts WPC

Citation preview

Page 1: Creating New Page Layouts WPC

Creating New Page Layouts 

UseIf the page layouts delivered by SAP for the Web Page Composer do not completely meet your requirements, you can create your own page layouts and integrate them into the portal.

 

PrerequisitesYou have installed the SAP NetWeaver Developer Studio.

 

ProcedureWork through the following steps to be able to use new page layouts:...

       1.      Creating Files in SAP NetWeaver Developer Studio

       2.      Carrying Out Configuration in the Portal Content Studio

       3.      Working Through Configuration Steps in KM

       4.      Linking Containers and iViews

 

ResultWhen you have completed all steps, you can create new pages in the Web Page Composer based on your own page layouts.

 

 

Creating Files in the SAP NetWeaver Developer Studio  

UseTo define a new page layout for the Web Page Composer, you create two files in a project in the SAP NetWeaver Developer Studio. You describe the page layout in a JSP file.

Procedure

1. Create a Project in the SAP NetWeaver Developer Studio

       1.      Start the SAP NetWeaver Developer Studio.

       2.      Create a new project of the type Portal Application for storing your new files.

2. Describe the Page Layout in a JSP FileThere are the following ways of describing a page layout:

Page 2: Creating New Page Layouts WPC

●      Using HTML tables

The table cells contain container tags into which you later add content in the page editor.

●      Using CSS-based layouts

For example, the JSP tabs for the container iViews are in blocks that are generated by <div> elements.

...

       1.      Create a JSP file in your project.

       2.      Describe the page layout and its areas (containers) using <div> or <table> definitions that are based on the HTML specification.

For additional examples of JSP files that describe page layouts with HTML tables, see Examples of JSP Files with Different Page Layouts.

3. Create a portalapp.xml FileThe portalapp.xml file is the deployment descriptor for portal applications. The file describes the components (containers) and properties of the page layout. ......

       1.      Create a portalapp.xml file in the project.

       2.      Use this file to define properties for all of the containers that you use in the new layout. The names of the areas (containers) from the JSP file must match the values of the properties from the portalapp.xml file.

For an example of the portalapp.xml file that you can use for the previously mentioned JSP examples, see Example: portalapp.xml.

4. Export the Project and Upload it to the Portal......

       1.      Export the project and two files as a PAR file.

       2.      Upload the PAR file to your portal. In the portal, choose System Administration ® Support ® Portal Runtime ® Administration Console. Select the file in the input field beneath Upload Archive and then choose Upload.

ResultYou have created the required files in the SAP NetWeaver Developer Studio and uploaded the PAR file to the portal.

Now carry out the procedure described in Carrying Out Configuration in the Portal Content Studio.

Page 3: Creating New Page Layouts WPC

Examples of JSP Files with Different Page Layouts 

Example 1You want to use the following page layout with three horizontally-arranged areas in the Web Page Composer:

To do this, create a JSP file with the following content:

 <%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.WpcTagLibLayout" prefix="sdn"%>

<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>

<lyt:template>

<table id="SAPexample1" border="0" width="100%" cellpadding="2" cellspacing="0">

<tr>

<td valign="top">

<div>

<sdn:container id="top" />

</div>

</td>

</tr>

<tr>

<td valign="middle">

<div>

<sdn:container id="middle" />

</div>

</td>

</tr>

<tr>

<td valign="bottom">

<div>

Page 4: Creating New Page Layouts WPC

<sdn:container id="bottom" />

</div>

</td>

</tr>

</table>

</lyt:template>

 

You can find the information on this page layout that is required for the portalapp.xml file in Example: portalapp.xml.

 

Example 2You want to use the following page layout in the Web Page Composer:

To do this, create a JSP file with the following content:

 <%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.WpcTagLibLayout" prefix="sdn"%>

<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>

<lyt:template>

<table id="SAPexample2" border="0" cellpadding="0" cellspacing="0" width="100%">

<tbody>

<tr>

<td colspan="3" width="100%">

<sdn:container id="top" />

</td>

</tr>

<tr>

<td width="20%">

<sdn:container id="left" />

</td>

<td width="60%">

<sdn:container id="middle" />

</td>

<td width="20%">

Page 5: Creating New Page Layouts WPC

<sdn:container id="right" />

</td>

</tr>

</tbody>

</table>

</lyt:template>

 

You can find the information on this page layout that is required for the portalapp.xml file in Example: portalapp.xml.

 

 

Example: portalapp.xml This section contains an example of the portalapp.xml file, which contains the required properties for both examples of JSP files with different page layouts. There is a <component> block for each page layout. If you are only using one example, delete the block that you do not require.

 <?xml version="1.0" encoding="ISO-8859-1"?>

<application>

<application-config>

<property name="SharingReference" value="com.sap.nw.wpc.page.templates,com.sap.portal.pagebuilder"/>

</application-config>

<components>

 

<component name="SAPexample1">

<component-config>

<property name="ClassName" value="com.sapportals.portal.pb.layout.PageLayout"/>

<property name="ResourceBundleName" value="pagebuilder_nls"/>

<property name="SecurityZone" value="com.sap.portal/no_safety"/>

</component-config>

<component-profile>

<property name="ComponentType" value="com.sapportals.portal.layout" />

<property name="com.sap.portal.pcm.Title" value="SAP Example Layout 1"/>

<property name="com.sap.portal.pcm.Description" value="SAP documentation example"/>"/>

<property name="com.sap.portal.reserved.layout.TagLibLayout" value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>

<property name="com.sap.portal.reserved.layout.WpcTagLibLayout" value="/SERVICE/com.sap.nw.wpc.page.templates/taglib/wpclayout.tld"/>

<property name="com.sap.portal.reserved.layout.TemplateFile" value="SAPexample1.jsp"/>

<property name="AuthScheme" value="anonymous" />

Page 6: Creating New Page Layouts WPC

<property name="EPCFLevel" value="0" />

<property name="com.sap.portal.reserved.layout.Cont1" value="top">

<property name="title" value="Top of the page"/>

<property name="orientation" value="vertical"/>

</property>

<property name="com.sap.portal.reserved.layout.Cont2" value="middle">

<property name="title" value="Middle of the page"/>

<property name="orientation" value="vertical"/>

</property>

<property name="com.sap.portal.reserved.layout.Cont3" value="bottom">

<property name="title" value="Bottom of the page"/>

<property name="orientation" value="vertical"/>

</property>

</component-profile>

</component>

 

<component name="SAPexample2">

<component-config>

<property name="ClassName" value="com.sapportals.portal.pb.layout.PageLayout"/>

<property name="ResourceBundleName" value="pagebuilder_nls"/>

<property name="SecurityZone" value="com.sap.portal/no_safety"/>

</component-config>

<component-profile>

<property name="ComponentType" value="com.sapportals.portal.layout" />

<property name="com.sap.portal.pcm.Title" value="SAP Example Layout 2"/>

<property name="com.sap.portal.pcm.Description" value="SAP documentation example"/>

<property name="com.sap.portal.reserved.layout.TagLibLayout" value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>

<property name="com.sap.portal.reserved.layout.WpcTagLibLayout" value="/SERVICE/com.sap.nw.wpc.page.templates/taglib/wpclayout.tld"/>

<property name="com.sap.portal.reserved.layout.TemplateFile" value="SAPexample2.jsp"/>

<property name="AuthScheme" value="anonymous" />

<property name="EPCFLevel" value="0" />

<property name="com.sap.portal.reserved.layout.Cont1" value="top">

<property name="title" value="Top of the page"/>

<property name="orientation" value="vertical"/>

</property>

<property name="com.sap.portal.reserved.layout.Cont2" value="left">

<property name="title" value="Left Column"/>

<property name="orientation" value="vertical"/>

</property>

<property name="com.sap.portal.reserved.layout.Cont3" value="middle">

Page 7: Creating New Page Layouts WPC

<property name="title" value="Middle Column"/>

<property name="orientation" value="vertical"/>

</property>

<property name="com.sap.portal.reserved.layout.Cont4" value="right">

<property name="title" value="Right Column"/>

<property name="orientation" value="vertical"/>

</property>

</component-profile>

</component>

 

</components>

<services/>

</application>

 

Carrying Out Configuration in the Portal Content Studio 

UseTo be able to use a new page layout with the Web Page Composer, you must create the following templates and objects in the Portal Content Studio:

●      Layout template

●      iViews

●      Page

ProcedureYou work through the following procedures in the Portal Content Studio. The Portal Content Studio is located in the portal at Content Administration ® Portal Content. In the tree view, choose Portal Content ® Web

Page Composer.

1. Create a Layout TemplateIn the Portal Content Studio, create a new layout template....

       1.      Use the secondary mouse button to choose the folder Portal Content ® Web Page Composer ® Page Layout Templates. In the context menu, choose New ® Layout.

       2.      Select the portal archive that you previously created in the SAP NetWeaver Developer Studio and that contains the new page layout. Choose Next. The system displays all page layouts that are defined in the portalapp.xml file as <component>.

       3.      Select the required page layout. Choose Next.

       4.      Specify the default properties Layout Name and Layout ID. Check your entries and choose Finish.

       5.      Choose Open Object for Editing and then choose OK. Check the Object is a Template property.

Page 8: Creating New Page Layouts WPC

       6.      Choose Save to save your layout template.

2. Create iViewsIn the portal, iViews are used to display all areas (containers) of the page layout. Create a container iView for each area of the page layout....

       1.      Use the secondary mouse button to choose the folder Portal Content ® Web Page Composer ® Container iViews.

       2.      You only have to perform this step once for each layout template. Create a separate subfolder for storing these iViews to obtain a clearer overview.

       3.      Navigate to the subfolder for the layout template and choose New ® iView from the context menu.

       4.      Choose iView Template. Choose Next.

       5.      Select the WPC Container template iView template. Choose Next.

       6.      Specify the default properties Name and iView ID. Choose Next.

Enter a name that it is easy to associate with the page area.

       7.      Check your entries and choose Finish.

       8.      The following step is necessary for the subsequent indexing process: Choose Open the object for editing and choose OK. Switch to the Availability property category. In the Supported User Agents property, make sure that no entry is selected.

       9.      To save the iView, choose Save.

Repeat these steps for all other areas of the page template.

3. Create Page and Arrange iViews on ItCreate a page....

       1.      Use the secondary mouse button to choose the folder Portal Content ® Web Page Composer ® Page Layouts. In the context menu, choose New ® Page.

       2.      Specify the default properties Name and ID. Choose Next.

       3.      Choose the Default Page Template template. Choose Next.

       4.      Select the layout template you created previously and choose Add. Choose Next. Check your entries and choose Finish.

       5.      Choose Open Object for Editing and then choose OK.

       6.      Go to the Availability property category in the property editor. In the Supported User Agents property, make sure that no entry is selected.

       7.      To save your entries, choose Save.

Place the iViews on the page. ...

Page 9: Creating New Page Layouts WPC

       1.      Use the secondary mouse button to select one of the iViews in the folder Portal Content ® Web Page Composer ® iViews.

       2.      In the context menu, choose Add Page To Workset ® Delta Link.

       3.      Repeat these steps until all iViews are entered on the page.

       4.      Switch to the Page Layout mode. Use Drag&Drop to move the iViews to the required positions in the page layout.

       5.      To save the page, choose Save.

Copy the page ID in the Portal Content Studio to the clipboard. Use the secondary mouse button to select the page in the folder Portal Content ® Web Page Composer ® Page Layouts. You can find the ID in the tree view in the Quick Info area.

ResultYou have created the required page in the Portal Content Studio. You can now carry out the configuration steps in KM.

Carrying Out Configuration Steps in KM  

UseYou must create and configure various objects in the Knowledge Management configuration for the new page layout.

PrerequisitesYou have worked through the following steps:

●      Creating Files in the SAP NetWeaver Developer Studio

●      Carrying Out Configuration in the Portal Content Studio

You must modify the main page once to avoid a loss of the configuration data when you update the software. More information: Making Customer-Specific Modifications to the Main Page.

Page 10: Creating New Page Layouts WPC

ProcedureLaunch the configuration user interface for Knowledge Management. In the portal, choose System

Administration ® System Configuration ® Knowledge Management ® Content Management.

1. Create a Layout Template...

       1.      In the KM configuration, choose Web Page Composer ® Layout ® Layout Templates ® Layout Templates.

       2.      Choose New to create a new layout template.

       3.      Specify a name and enter the ID for the page layout that you just copied from the Portal Content Studio in the PCD Object ID parameter.

More information: Layout Configuration

2. Extend the Layout GroupTo display the new page layout in the list of available layouts in the Web Page Composer, you must enter the new page layout in the layout group you created (see Making Customer-Specific Modifications to the Main Page), for example <customer>_wpc_page_group. This group contains all available page layouts....

       1.      In the KM configuration, choose Web Page Composer ® Layout ® Layout Groups ® Layout Groups.

       2.      Open the wpc_page_group instance and choose the new page layout in the Layouts parameter.

Save your changes by choosing OK.

More information: Layout Configuration.

3. Create Resource TypesYou require a separate resource type for the page template and for each area of the page....

       1.      In the KM configuration, choose Global Services ® Resource Types ® Resource Types.

       2.      Create a separate resource type for the page template and for each area of the page. Enter values for the Name and Resource Type ID parameters. Use the prefix wpc_, for example wpc_my_type, for these values.

Activate the Reserved for Application parameter for all new resource types.Activate the Is for a Collection parameter for the resource type for the page template.

More information: Resource Types.

4. Create Web Resource TypesYou require a separate Web resource type for the page template and for each area of the page....

       1.      In the KM configuration, choose Web Page Composer ® Web Content Types ® Web Resource Type.

Page 11: Creating New Page Layouts WPC

       2.      To create the Web resource type for the page with predefined values, search for the wpc_page instance, select it, and choose Duplicate. Modify the name and the following parameters:

Allowed Child Types: Choose the resource types you just created for the pages areas.Allowed Layouts: Choose the wpc_page_group instance.Default Layout: Choose the layout template you just created.Resource Type: Choose the resource type you just created for the page layout.

       3.      Create a Web resource type for each page area. Modify the name and the following parameters:

Default Layout: Choose the editorcontainer layout template.Resource Type: Choose the resource type you just created for this page area.Toolbar: Choose the container entry.

More information: Web Resource Types.

5. Create ContainersFor the areas of the page template for which you created a container iView in the Portal Content Studio, create a container in the KM configuration and assign resource types and MIME types that you want to use in the container in question.

If you want to use the same Web resource types and MIME types in all areas of the page template, you only need to create one new container.

...

       1.      In the KM configuration, choose Web Page Composer ® Containers ® Containers. Choose New.

       2.      Create a container for each area of the page template. In the Allowed Resource Types parameter, choose the Web resource type that you just created for each container. If required, you can also choose MIME types that are permitted in this container.

More information: Container.

ResultYou have worked through all the settings in the Knowledge Management configuration that are necessary to integrate a new page layout in the Web Page Composer. Continue with the Linking Containers and iViews step.

Page 12: Creating New Page Layouts WPC

Making Customer-Specific Modifications to the Main Page 

UseBefore you start creating your own page layouts, you must first perform the following steps once. The steps are required so that future software updates do not overwrite customer-specific entries in the configuration of the main page.

More information: Layout Configuration.

Procedure

Copy the Configuration of a Web Resource Type to the Configuration of the Main Page...

       1.      The configuration of the Web type resources is located in the portal at System Administration ® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Web Content Types ® Web Resource Type.

       2.      Select the wpc_page instance and choose View.

       3.      Write down the values of the parameters.

       4.      Go to the configuration user interface for Web Page Composer ® Main Page.

       5.      Select the main_page instance and choose View. If this instance does not yet exist, crate it with New.

       6.      Copy the values you wrote down for the Web resource type to this configuration object. Save it by choosing OK.

Create a Copy of Layout Group wpc_page_groupYou need a copy of layout group wpc_page_group. ...

       1.      Launch the configuration user interface for Knowledge Management. In the portal, choose System Administration ® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Layout ® Layout Groups ® Layout Groups.

       2.      Search for the wpc_page_group instance, select it, and choose Duplicate. Enter a name of your choice, such as <customer>_wpc_page_group, and save it by choosing OK.

Enter a Customer-Specific Layout Group in the Configuration of the Main Page...

       1.      Launch the configuration user interface for Knowledge Management. In the portal, choose System Administration ® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Main Page.

       2.      Select the main_page instance and choose Edit.

       3.      In the Allowed Layouts parameter, select the name of the layout group you created, for example <customer>_wpc_page_group. Save it by choosing OK.

Page 13: Creating New Page Layouts WPC

Layout Configuration The configuration of the Web Page Composer encompasses items that are required for the layout and display of created pages in the portal.

 

Main PageThe main page is the page that is displayed in the Page Editor when a Web page is opened for processing for the first time. The configuration of the main page references all the permitted page layouts that you can select for the Web page as well as the standard page layout.

The main page must be configured once. More information: Making Customer-Specific Modifications to the Main Page.

The configuration is located in the portal at System Administration® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Main Page ® Main WPC Page.

Parameters of the Main Page

Parameter Required Description

Name Yes Name of the main page: main_page

Published No Specifies if the main page is available

Default setting: Activated

Requires Framework No Specifies whether a framework page is required for the display

Default setting: Activated

Allowed child types No Selection of the resource types that can be generated as children in this Web resource type

Default setting: wpc_webarticle, wpc_webbanner, wpc_webfeature, wpc_weblinklist, wpc_websimple

Allowed parent types No Selection of the resource types that can be used as parents of the main page

Default setting: wpc_page_folder, wpc_translated_pages_folder

Allowed repositories No The main page can be used in all repositories

Standard setting: No specification

Allowed Layouts No Specification of a customer-specific layout group that contains all the layouts that are available when a page is opened in the Page Editor

Standard setting: Customer-specific

Default Layout No Page layout that is assigned to all newly created Web pages by default

You can change the page layout of a Web page in the Page Editor.

Default setting: wpc_layout_template_home_page

Resource Type Yes Selection of the corresponding resource type

Default setting: wpc_page

Toolbar No Selection of a toolbar that contains commands for

Page 14: Creating New Page Layouts WPC

the Web resource type

Default setting: page_toolbar

Allowed RIDS No Not used

Class Auto Create No Not used

Description No Description of the main page

Factory implementation No Specification of the factory implementation needed to create instances

Default setting:

com.sap.sdn.wcm.km.extresource.IExtResourceFactory

 

Framework Page TemplatesThe default framework page layout is the basis for displaying pages created with the Web Page Composer in the portal.

The configuration is located in the portal at System Administration® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Layout ® Layout Templates ® Framework Templates.

If you are using your own modified framework pages in the portal and you want to use them to display WPC pages too, you have to create new framework page layouts. Specify the IDs of the framework pages from the Portal Content Studio in the configuration.

Parameters of Framework Page Templates

Parameter Required Description

Name Yes Name of the framework page template:

The framework page template delivered by SAP is called default.

Bundle File No Specifies the bundle file in which the key and label for the framework page template are stored.

Key for Description No Specifies the key that returns the description of the framework page template.

The key is stored in the bundle file.

PCD Object ID No Specifies the ID of the framework page used in the portal from the Portal Content Studio.

The light framework page is used in the standard delivery: pcd:portal_content/every_user/general/lightframeworkpage

Thumbnail Image Path No Specifies a graphic to be used as a preview image of the framework page.

 

Framework PagesFramework pages are used to display the following views:

●      Design time (page editor)

●      Runtime (view of current page in portal)

Page 15: Creating New Page Layouts WPC

●      Preview mode

 

The configuration is located in the portal at System Administration® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Layout ® Framework Pages.

If you use your own modified framework pages in the portal and have created corresponding framework page templates for them in the KM configuration, you also have to configure the new framework pages for the three views and specify the required framework page template in the Layout parameter.

Framework Page Parameters

Parameter Required Description

Name Yes Name of the framework page

Layout Yes Specified the framework page template that is used if the RID Pattern and Mode selection criteria match.

The default framework page is entered in the default configuration delivered by SAP.

Alias Yes Specifies the portal alias for which this framework page template is to be used.

* means that the framework page template can be used for all aliases.

Key for Description Yes Specifies the key that returns the description of the framework page.

The key is stored in the bundle file.

RID Pattern Yes Specifies the path pattern for which this framework page can be used.

* stands for all path patterns.

mode Yes Specifies the mode in which the framework page is used.

The possible specifications referenced in the program code are as followed:

wpcpreview: Preview mode

design: Page editor

*: All views

 

Layout Templates for MIME TypesThere are different layout templates for different MIME types. The MIME types are read from the KM configuration. There are currently templates for image and HTML files and for Shockwave Flash. The portal component configured in the selected layout is used to display the MIME types.

The configuration is located in the portal at System Administration® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Layout ® Default Mime Type Layouts ® Layout Templates.

Parameters of Layout Templates for MIME Types

Parameter Required Description

Name Yes Name of the MIME type-specific layout template

Default Layout Yes Layout selection

Page 16: Creating New Page Layouts WPC

A portal component that serves to display the items of the MIME type in question is configured in the layout template configuration.

Mime Type Yes MIME type selection

Key for Description Yes Specifies the key that returns the description of the MIME type layout.

The key is stored in the bundle file.

 

Layout TemplatesYou have to establish a connection in KM for each page in the Portal Content Studio that is used for the Web Page Composer. You do this with layout templates.

The configuration is located in the portal at System Administration® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Layout ® Layout Templates ® Layout Templates.

Layout Template Parameters

Parameter Required Description

Name Yes Name of the layout

Bundle File No Specifies the bundle file (for example, for the translation)

Key for Description No Specifies the key in the bundle file that contains the description of the layout

If you are not using a bundle file, you can enter a description to be used in all languages here.

PCD Object ID No Specifies the ID of the corresponding page from the Portal Content Studio.

Thumbnail Image Path No Specifies a graphic to be used as a preview image of the page layout in the page editor

 

Layout GroupsYou can group together multiple page layouts to form a layout group.

You can enter a layout group that contains page layouts that can be used to display the Web resource type in the configuration of Web resource types. You can call the page layouts permitted for a Web resource type in the page editor by choosing Change Layout.

The configuration of layout groups is located in the portal at System Administration ® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Layout ® Layout Groups ® Layout Groups.

Layout Group Parameters

Parameter Required Description

Name Yes Name of the layout group

Layouts No Selection of the layouts grouped in the layout group

Description No More detailed description of the layout group

Page 17: Creating New Page Layouts WPC

 

 

Web Resource Types A Web resource type represents a configuration object that describes the behavior of a content object.

A Web resource type can serve as one of the following objects:

●      Page

●      Page area in which you can arrange Web content

●      Web form that you can use to create Web content

The Web resource type concept represents an enhancement to the existing resource type concept in that it supplies additional settings in addition to the connection to the resource type of a resource. For example, a Web resource type is used to define which layout is used to display a resource of the type in question.

However, the main function of the Web resource type concept is to connect resources from Knowledge Management with objects from the Portal Content Studio in the form of layouts.

The configuration of the Web type resources is located in the portal at System Administration ® System

Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Web

Content Types ® Web Resource Type.

Web Resource Type Parameters

Parameter Required Description

Name Yes Name of the Web resource type

Published No Specifies whether the Web resource type exists as a page template

Requires Framework No Specifies whether a framework page is required for the display

A suitable framework page must be configured.

Allowed child types No Selection of the resource types that can be generated as children in this Web resource type

If this Web resource type is used as a page template, you have to specify the entries wpc_webarticle and wpc_webhtmlfile as well as the resource types that can be created on the page template as Web content.

Allowed parent types No Selection of the resource types that can be

Page 18: Creating New Page Layouts WPC

used as parents of this Web resource type

If this Web resource type is used as a Web form, you have to specify the entries wpc_content_folder and wpc_page as well as the page templates on which you want to create objects.

Allowed repositories No Selection of repositories in which the Web resource type can be created

If you do not make a selection, the Web repository type can be used in all repositories.

Allowed Layouts No Selection of a layout group that contains all layouts that can be used for the Web resource type that serves as a page template

In addition, you should specify a toolbar that contains the Layout command for changing the layout in the Toolbar parameter.

Default Layout No You use the layout template to create a connection between the Portal Content Studio and the portal for technical reasons.

If the Web resource type is used as a page, enter the layout template for the page.

If the Web resource type is used as a Web form or page area, you can specify a template that you created yourself or you can select the editcontainer layout template delivered by SAP.

Resource Type Yes Selection of the corresponding resource type

Toolbar No Selection of a toolbar that contains commands for the Web resource type

The toolbar is displayed in the upper area of the page editor if the Web resource type is added to the page.

Allowed RIDS No List of paths in whose instances the Web resource type can be created

You have to use the placeholder ** so that the command is available for creating the Web resource type in all folders of the site hierarchy. For more information, see the documentation that follows this table.

Example: /wpccontent/Cross-Site Content/**, **/Site-Content/**

Class Auto Create No Specifies the Java class for the automatic generation of content

If you enter a container in which only this Web resource type is permitted for editing, the Java class specified in this parameter automatically generates content for the container in question.

The class must implement the

Page 19: Creating New Page Layouts WPC

com.sap.nw.wpc.km.service.compoundprovider.ICompoundAutoCreate interface.

Description No More detailed description of the Web resource type

Factory implementation No Specifies the factory implementation required to create instances of this Web resource type

The factory implementation must implement the com.sap.sdn.wcm.km.extresource.IExtResourceFactory interface.

Use of the ** Placeholder in the Allowed RIDS ParameterYou must use the ** placeholder in the Allowed RIDS parameter so that the commands for creating new Web content are displayed in the folder hierarchy of all sites.

Below are some examples of the usage of the ** placeholder and its effect:

●      /wpccontent/My Folder

The command for creating new Web content based on the new Web resource type is only available in the /wpccontent/My Folder folder.

●      /wpccontent/My Folder/**

The command is available in the /wpccontent/My Folder folder and in its subfolders.

●      **/My Folder

The command is available in the folder hierarchy in all folders with the name /My Folder.

●      **/My Folder/**

The command is available in the folder hierarchy in all folders with the name /My Folder and in their subfolders.

Container 

UseContainers are the areas of a page. In the page editor, you can use Drag&Drop to pull content into the available containers. The container configuration defines which MIME types or resource types can be used in a container.

 

IntegrationIn the page editor, you can display information about each container by choosing the Information command in the menu bar for a page or a container. The following information about the container appears:

Page 20: Creating New Page Layouts WPC

●      Container name

●      Assigned resources

●      Permitted resource types and MIME types

 

FeaturesA container is defined using the following parameters:

Parameters of a Container

Parameter Required Description

Name Yes Container name

Allowed MIME Types No Selects the MIME types that can be used and displayed in the container.

Allowed Resource Types No Selects the resource types that can be used and displayed in the container.

Key for Description No Specifies the corresponding key for the label containing the description of the container.

The key is stored in the bundle file.

 

ActivitiesIf you want to use your own layout templates for the Web Page Composer, you must also create containers during the configuration process and assign them to iViews. For more information, see Performing Configuration Steps in KM and Linking Containers and iViews.

 

You can find the configuration of the containers in the portal at System Administration ® System Configuration ® Knowledge Management ® Content Management ® Web Page Composer ® Containers ® Containers.

 

 

Linking Containers and iViews  

UseYou must create a connection between the containers in the page layout in KM and the iViews in the Portal Content Studio. To do this, you enter the names of the containers in a property of the iViews.

Procedure

Note the Names of the Containers...

       1.      Launch the configuration user interface for Knowledge Management. In the portal, choose System Administration ® System Configuration ® Knowledge Management ® Content Management Web Page Composer ® Containers ® Containers.

       2.      Copy the names of all the containers that you have created for the new page layout to an empty text file.

Page 21: Creating New Page Layouts WPC

Specify the Container Names in the iView Configuration...

       1.      Open the Portal Content Studio. In the portal, choose Content Administration ® Portal Content. In the tree view, choose Portal Content ® Web Page Composer ® Container iViews. Now choose the folder in which the iViews for the layout template are stored.

       2.      Open each iView that you are using in your new page layout. Use the secondary mouse button to select the iView and choose Open ® Object from the menu.

       3.      In the Property Category, choose the Web Page Composer option.

       4.      Enter the corresponding container name from the KM configuration in the Container Type property for each iView. When you do this, the text file containing the container names is helpful.

       5.      Save all the iViews.

ResultYou can now use the new page layout. You can find the new page layout in the layout manager of the Web Page Composer. To call the layout manager, choose Select Page Layout from the menu bar of the page editor.

Page Layouts in the Standard System The standard system layouts are located in the Portal Content Studio. To call the Portal Content Studio, choose Content Administration ® Portal Content in the portal. Then choose Web Page Composer ® Page Layouts.

 

The layouts delivered by SAP are described below. The subheading contains the short name with the full name of the layout in the Portal Content Studio in brackets.

The Page Header Links container is not included in the graphics in order to make the graphics clearer. In each page layout, it is positioned above all other containers and takes up the entire width of the page. It contains functions such as RSS, Send To, Edit, and Print.

 

Home Page (WPC Layout Home Page)In this layout, the Main Content 1 and Footer containers take up the entire width of the page. Between these two containers, the containers A1 - A4 and B1 - B4 take up 75% and 25% of the width of the page respectively.

Page 22: Creating New Page Layouts WPC

 

News Page (WPC Layout News Page)This layout does not contain the Main Content 1 container. The containers A1 - A6 and C1 - C6 take up 75% and 25% of the width of the page respectively. The Footer container takes up the entire width of the page.

 

Page 23: Creating New Page Layouts WPC

One Column Page (WPC Layout One Column Page)In this layout, the Main Content 1, A1 - A4, and Footer containers all take up the entire width of the page.

 

 

Two Column Page (WPC Layout Two Column Page)In this two-column layout, containers A1 - A4 have the same width as containers B1 - B4. These containers are positioned between the Main Content 1 and Footer containers.

Page 24: Creating New Page Layouts WPC

 

Three Column Page (WPC Layout Three Column Page)In this three-column layout, a third column is added to the two-column layout illustrated above. This column contains containers C1 to C6. The width ratio of A to B to C is 37.5% to 37.5% to 25%.

 

Page 25: Creating New Page Layouts WPC

Reuse of Containers and iViews The following issues argue for the reuse of containers and iViews:

●      If you change the page layout in the page editor, the content is retained.

●      The configuration remains manageable.

 

For these reasons, use names for iViews and containers that do not have a direct reference to future content. For example, you can use names that describe the layout in a cell-based manner as in a matrix.

 

Changing Page Layouts and Retaining ContentIf you select another layout for an existing Web page in the page editor, it is possible for the content from the containers of the page to be adopted automatically if you use the same container iViews in the other page layout.

When you change the layout, inserted page objects such as articles and banners are moved into the position in the new layout in which the container iView with the same ID is located.

When you change from page layout A to page layout B, the following can occur:

●      Container C1 occurs in A but not in B ® Container C1 is hidden

●      Container C2 does not occur in A but does occur in B ® Container C2 is empty or contains an earlier assigned value

●      Container C3 occurs in both A and B ® Container C3 retains its content

 

Keeping the Configuration ManageableWe recommend the reuse of containers in the configuration in Knowledge Management and the reuse of iViews in the Portal Content Studio for reasons of manageability. Having fewer objects makes your work easier because the objects that do exist are easier to find.

 

For a list of page layouts that SAP delivers in the standard system, see Page Layouts in the Standard System. The names of the container iViews are also specified there. If the corresponding containers and their preconfigured resource and MIME types meet your requirements, you can use the container iViews in the SAP standard system for your own layout templates.